---
title: "Resolve Tools"
method: POST
path: "/tools/resolve"
tags: ["Tools"]
---

# Resolve Tools

`POST /tools/resolve`

Resolve an agent's tool references into model-ready specs.

Validates Composio connections up front and enriches each action from the
catalog, so a running agent (e.g. Pi) gets ``customTools`` whose ``execute``
routes back through ``POST /tools/call`` — provider keys stay server-side.

## Request body

- ToolResolveRequest
  - `tools` union[]
    - union
      - BuiltinToolConfig — Legacy entry, accepted so revisions written before the rework still parse. Built-in tools are always active and are no longer configured here; the resolver drops every entry with a warning. Keep this arm until the dual-read window closes.
        - `render` object, nullable
        - `permission` 'allow' | 'ask' | 'deny', nullable
        - `type` 'builtin'
        - `name` string, required
      - GatewayToolConfig
        - `render` object, nullable
        - `permission` 'allow' | 'ask' | 'deny', nullable
        - `type` 'gateway'
        - `provider` string
        - `integration` string, required
        - `action` string, required
        - `connection` string, required
        - `name` string, nullable
      - GatewayConnectionToolConfig — One whole integration, with a policy the SDK compiles into per-tool decisions. Replaces the one-entry-per-tool :class:`GatewayToolConfig`, which stays readable while saved revisions migrate. The entry carries no credentials, provider account IDs, tool schemas, or read-only hints: those are resolved data, not authored configuration. It does not extend :class:`ToolConfigBase`. That base carries a per-tool ``render`` and ``permission``, and an entry that covers a whole integration has no single tool to apply either to. Every permission here lives in ``policy``, so a top-level one is refused instead of accepted and then ignored, which would let an author believe a `deny` applies when nothing reads it. The deleted legacy permission spellings are refused here for the same reason, rather than dropped in silence as they are on the other arms.
        - `type` 'gateway_connection'
        - `connection` GatewayConnectionRef, required — The shared project connection a gateway entry points at. A resource reference, never a credential: the project owns the connection and several agents can reuse it, each with its own policy.
          - `provider` 'composio'
          - `integration` string, required
          - `slug` string, required
        - `policy` GatewayConnectionPolicy, required — The ``policy`` node of the saved entry. It mirrors the saved nesting and holds one field on purpose, so a later policy of a different kind has a place to go.
          - `permissions` GatewayPermissions, required — What the agent may do through one connection, per tool key.
            - `default` 'inherit' | 'allow' | 'ask' | 'deny', required
            - `tools` object

## Response `200`

Successful Response

- ToolResolveResponse
  - `count` integer
  - `builtins` string[]
  - `custom` ResolvedTool[]
    - `name` string, required
    - `description` string, nullable
    - `input_schema` object, nullable
    - `call_ref` string, required
    - `read_only` boolean, nullable
  - `gateway_connections` ResolvedGatewayConnection[]
    - `provider` string, required
    - `integration` string, required
    - `connection` string, required
    - `toolkit_version` string, required
    - `tools` ResolvedGatewayTool[]
      - `key` string, required
      - `read_only` boolean, nullable

## Other responses

- `422` — Validation Error

## Changes

- **2026-08-31** `48ced00d9a1c` — 2 info
  - added `#/components/schemas/GatewayConnectionToolConfig` to the `tools/items/` request property `anyOf` list
  - added the optional property `gateway_connections` to the response with the `200` status
- **2026-07-25** `5a14788d939f` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/agenta-ai/apis/agenta-api/changes/tools/resolve/post.md)

---

[API](https://skmtc.dev/agenta-ai/apis/agenta-api.md) · [All operations](https://skmtc.dev/agenta-ai/apis/agenta-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/agenta-ai/agenta-api/revisions/48ced00d9a1c/schema)
