> ## Documentation Index
> Fetch the complete documentation index at: https://www.voiceflow.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Audit environment wiring

> Check how tools, functions and variables connect.



## OpenAPI

````yaml /specs-prettified/realtime/openapi.stable.json get /v1/stable/environment/{environmentAlias}/audit-wiring
openapi: 3.0.0
info:
  title: Realtime
  description: Realtime gateway API service
  version: 1.0.0
  contact: {}
servers:
  - url: https://realtime-api.voiceflow.com
security: []
tags: []
paths:
  /v1/stable/environment/{environmentAlias}/audit-wiring:
    get:
      tags:
        - Environment
      summary: Audit environment wiring
      description: Check how tools, functions and variables connect.
      operationId: StableEnvironmentController_auditWiring
      parameters:
        - name: environmentAlias
          required: true
          in: path
          schema:
            type: string
        - name: projectID
          required: true
          in: query
          schema:
            type: string
            description: The ID of the project to operate on.
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StableEnvironmentAuditResponse"
      security:
        - token: []
components:
  schemas:
    StableEnvironmentAuditResponse:
      type: object
      properties:
        audit:
          $ref: "#/components/schemas/StableEnvironmentAuditReport"
      required:
        - audit
    StableEnvironmentAuditReport:
      type: object
      properties:
        phase1VarSetters:
          type: object
          additionalProperties:
            type: array
            items:
              type: object
              properties:
                function:
                  type: string
                agent:
                  type: string
                output:
                  type: string
              required:
                - function
                - agent
                - output
        phase2OrphanDefaults:
          type: array
          items:
            type: object
            properties:
              toolID:
                type: string
              function:
                type: string
              agent:
                type: string
              input:
                type: string
              defaultVar:
                type: string
              note:
                type: string
            required:
              - toolID
              - function
              - agent
              - input
              - defaultVar
              - note
        phase3ShouldFulfillWithCanonicalSource:
          type: array
          items:
            type: object
            properties:
              toolID:
                type: string
              function:
                type: string
              agent:
                type: string
              input:
                type: string
              suggestedDefaultVar:
                type: string
              note:
                type: string
            required:
              - toolID
              - function
              - agent
              - input
              - suggestedDefaultVar
              - note
        phase4UncapturedOutputs:
          type: array
          items:
            type: object
            properties:
              function:
                type: string
              output:
                type: string
              toolCount:
                type: number
              note:
                type: string
            required:
              - function
              - output
              - toolCount
              - note
        phase5MalformedWiring:
          type: array
          items:
            type: object
            properties:
              toolID:
                type: string
              function:
                type: string
              agent:
                type: string
              input:
                type: string
              issue:
                type: string
              current:
                type: string
              shouldBe:
                type: string
            required:
              - toolID
              - function
              - agent
              - input
              - issue
              - current
              - shouldBe
        phase6SuggestedCaptures:
          type: array
          items:
            type: object
            properties:
              function:
                type: string
              output:
                type: string
              suggestedVar:
                type: string
              currentCapturesTo:
                nullable: true
                type: array
                items:
                  type: string
              note:
                type: string
            required:
              - function
              - output
              - suggestedVar
              - currentCapturesTo
              - note
        phase7SideEffectOnly:
          type: array
          items:
            type: object
            properties:
              function:
                type: string
              agents:
                type: array
                items:
                  type: string
              note:
                type: string
            required:
              - function
              - agents
              - note
        phase8OrphanFunctions:
          type: array
          items:
            type: object
            properties:
              function:
                type: string
              inputCount:
                type: number
              outputCount:
                type: number
              note:
                type: string
            required:
              - function
              - inputCount
              - outputCount
              - note
        phase9ArgsSecretsReads:
          type: array
          items:
            type: object
            properties:
              function:
                type: string
              attachments:
                type: array
                items:
                  type: object
                  properties:
                    agent:
                      type: string
                    toolID:
                      type: string
                  required:
                    - agent
                    - toolID
              note:
                type: string
            required:
              - function
              - attachments
              - note
        phase10EmptyToolDescriptions:
          type: array
          items:
            type: object
            properties:
              toolID:
                type: string
              function:
                type: string
              agent:
                type: string
              note:
                type: string
            required:
              - toolID
              - function
              - agent
              - note
      required:
        - phase1VarSetters
        - phase2OrphanDefaults
        - phase3ShouldFulfillWithCanonicalSource
        - phase4UncapturedOutputs
        - phase5MalformedWiring
        - phase6SuggestedCaptures
        - phase7SideEffectOnly
        - phase8OrphanFunctions
        - phase9ArgsSecretsReads
        - phase10EmptyToolDescriptions
      description: One list per check. Each entry names the function, agent or tool it
        is about and says why.
  securitySchemes:
    token:
      scheme: bearer
      bearerFormat: JWT
      type: http
      description: Voiceflow bearer token
````
