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

# Execute a tool

> Run one operation of a tool agent with typed params. Gated and money verbs refuse unattended calls.


## OpenAPI

```yaml openapi.json post /v1/tools/{id}/execute
openapi: 3.1.0
info:
  title: Ocean One API
  version: 2.1.0
servers:
  - url: https://api.plungeai.com
paths:
  /v1/tools/{id}/execute:
    post:
      summary: "Execute a tool operation (fenced: gated/money verbs refuse unattended)"
      security:
        - ozkBearer: []
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                operation:
                  type: string
                  description: Operation name from the contract
                params:
                  type: object
                  description: Operation params per the contract inputSchema
                prompt:
                  type: string
                  description: Free-text prompt for prompt-driven agents
                format:
                  type: string
                  enum:
                    - json
                    - yaml
                    - markdown
                    - text
                  description: "Response format override (precedence: this field → Accept header → mirror of the request Content-Type). Default json. yaml = the envelope with Markdown as block scalars; markdown = the same result the MCP plane renders; text = the bare result content. An unknown value → 400 invalid_format."
      responses:
        "200":
          description: Execution result Response format negotiates via the `format` field, an Accept header (application/json, text/yaml, text/markdown, text/plain), or the request Content-Type mirror; default JSON.
          content:
            application/json:
              schema:
                type: object
                properties:
                  ok:
                    type: boolean
                  content:
                    type: string
                  outcome:
                    type: string
                  request_id:
                    type: string
                required:
                  - ok
                  - content
            text/yaml:
              schema:
                type: string
            text/markdown:
              schema:
                type: string
            text/plain:
              schema:
                type: string
        "400":
          description: invalid_format — format must be one of json, yaml, markdown, text
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "403":
          description: refused — fence/gated operation
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "404":
          description: unknown_tool
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "409":
          description: approval_required — needs a human approval surface; duplicate_execution_id — x-trace-id already used by an earlier run
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "413":
          description: payload_too_large — body over 1 MiB (MAX_REQUEST_SIZE)
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "422":
          description: invalid_params — needs_input; body carries missing/reserved + the contract
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "424":
          description: connection_required / credential_required — agent needs a connection or key
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "429":
          description: rate_limited — Retry-After header
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "502":
          description: execution_failed
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "503":
          description: agent_unavailable — agent temporarily down
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
components:
  schemas:
    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
          required:
            - code
            - message
          additionalProperties: true
      required:
        - error
  securitySchemes:
    ozkBearer:
      type: http
      scheme: bearer
      description: "ozk_ platform API key (Authorization: Bearer ozk_…)"
```
