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

# Get a tool contract

> The invocation contract of one tool agent: JSON Schema parameters, operations, approval gates and examples.


## OpenAPI

```yaml openapi.json get /v1/tools/{id}
openapi: 3.1.0
info:
  title: Ocean One API
  version: 2.5.0
servers:
  - url: https://api.plungeai.com
paths:
  /v1/tools/{id}:
    get:
      operationId: get-v1-tools-id
      summary: Get a tool contract (JSON Schema params, operations, gates, examples)
      security:
        - ozkBearer: []
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: The contract
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ToolContract"
        "401":
          description: unauthorized — missing, invalid or revoked ozk_ key
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "404":
          description: "unknown_tool; not_found — no route for this method on this path: every other method answers it"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
components:
  schemas:
    Credential:
      description: "The credential an agent runs on. `platform`: our keys, nothing to set up. `connection`: the caller’s own account at `provider` — connect it once with `POST /v1/connections/{provider}` (a key) or `POST /v1/connections/{provider}/link` (a hosted link); without it a call answers 424 with a `connect` pointer."
      oneOf:
        - type: object
          properties:
            tier:
              type: string
              enum:
                - platform
          required:
            - tier
        - type: object
          properties:
            tier:
              type: string
              enum:
                - connection
            provider:
              type: string
            method:
              type: string
              enum:
                - oauth
                - api_key
                - wallet
          required:
            - tier
            - provider
            - method
    Error:
      type: object
      description: Standard error envelope. Every error response also carries an `X-Error-Code` response header equal to error.code, so a client branches on the header regardless of the negotiated body format (json | yaml | markdown | text). When the request created an execution, the `X-Execution-Id` response header is also set. Errors follow the negotiated format like success bodies.
      properties:
        error:
          type: object
          properties:
            code:
              type: string
            message:
              type: string
            connect:
              type: object
              description: "On a 424 connection_required / credential_required: where the missing connection is made."
              properties:
                provider:
                  type: string
                method:
                  type: string
                  enum:
                    - oauth
                    - api_key
                    - wallet
                link:
                  type: string
                  example: POST /v1/connections/stripe/link
          required:
            - code
            - message
          additionalProperties: true
      required:
        - error
    ToolContract:
      type: object
      description: Exact invocation contract for a tool-agent.
      properties:
        agent_id:
          type: string
        credential:
          $ref: "#/components/schemas/Credential"
        name:
          type: string
        description:
          type: string
        operations:
          type: array
          items:
            type: object
            properties:
              name:
                type: string
              purpose:
                type: string
              gated:
                type: boolean
              required_params:
                type: array
                items:
                  type: string
            required:
              - name
              - gated
        inputSchema:
          type: object
        examples:
          type: array
          items:
            type: object
            properties:
              title:
                type: string
              cnl:
                type: string
            required:
              - title
              - cnl
        output_type:
          type: string
      required:
        - agent_id
        - name
        - description
        - operations
        - inputSchema
        - examples
      additionalProperties: true
  securitySchemes:
    ozkBearer:
      type: http
      scheme: bearer
      description: "ozk_ platform API key (Authorization: Bearer ozk_…)"
```
