API ReferenceTool Router

Search for tools using a query

Markdown
POST
/api/v3/tool_router/session/{session_id}/search

Search for tools matching a given use case query within a tool router session. Returns matching tool slugs, full tool schemas, toolkit connection statuses, and workflow guidance in a predictable format.

x-api-key<token>

Project API key authentication

In: header

Path Parameters

session_idstringRequired

Tool router session ID (trs_*)

Format: toolRouterSessionId

Request Body

application/json

queriesarray of objectRequired

List of search queries to execute in parallel. Up to 7 queries supported.

modelstring

Optional model hint for search/planning behavior (e.g., "gpt-4o"). Ignored if invalid.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://backend.composio.dev/api/v3/tool_router/session/trs_LX9uJKBinWWr/search" \  -H "Content-Type: application/json" \  -d '{    "queries": [      {        "use_case": "Send a slack message to a channel"      }    ]  }'
{
  "success": true,
  "error": "string",
  "results": [
    {
      "index": 0,
      "use_case": "string",
      "execution_guidance": "string",
      "difficulty": "string",
      "recommended_plan_steps": [
        "string"
      ],
      "known_pitfalls": [
        "string"
      ],
      "reference_workbench_snippets": [
        {
          "description": "string",
          "code": "string"
        }
      ],
      "primary_tool_slugs": [
        "string"
      ],
      "related_tool_slugs": [
        "string"
      ],
      "toolkits": [
        "string"
      ],
      "plan_id": "string",
      "error": "string",
      "memory": {
        "property1": [
          "string"
        ],
        "property2": [
          "string"
        ]
      }
    }
  ],
  "toolkit_connection_statuses": [
    {
      "toolkit": "string",
      "description": "string",
      "has_active_connection": true,
      "connection_details": {
        "property1": null,
        "property2": null
      },
      "current_user_info": {
        "property1": null,
        "property2": null
      },
      "status_message": "string"
    }
  ],
  "tool_schemas": {
    "property1": {
      "toolkit": "string",
      "tool_slug": "string",
      "description": "string",
      "input_schema": {
        "property1": null,
        "property2": null
      },
      "output_schema": {
        "property1": null,
        "property2": null
      },
      "hasFullSchema": true,
      "schemaRef": {
        "tool": "COMPOSIO_GET_TOOL_SCHEMAS",
        "args": {
          "tool_slugs": [
            "string"
          ]
        },
        "message": "string"
      }
    },
    "property2": {
      "toolkit": "string",
      "tool_slug": "string",
      "description": "string",
      "input_schema": {
        "property1": null,
        "property2": null
      },
      "output_schema": {
        "property1": null,
        "property2": null
      },
      "hasFullSchema": true,
      "schemaRef": {
        "tool": "COMPOSIO_GET_TOOL_SCHEMAS",
        "args": {
          "tool_slugs": [
            "string"
          ]
        },
        "message": "string"
      }
    }
  },
  "time_info": {
    "current_time_utc": "string",
    "current_time_utc_epoch_seconds": 0,
    "message": "string"
  },
  "session": {
    "id": "string",
    "generate_id": true,
    "instructions": "string"
  },
  "next_steps_guidance": [
    "string"
  ]
}
{
  "error": {
    "message": "string",
    "code": 0,
    "slug": "string",
    "status": 0,
    "request_id": "string",
    "suggested_fix": "string",
    "errors": [
      "string"
    ]
  }
}
{
  "error": {
    "message": "string",
    "code": 0,
    "slug": "string",
    "status": 0,
    "request_id": "string",
    "suggested_fix": "string",
    "errors": [
      "string"
    ]
  }
}
{
  "error": {
    "message": "string",
    "code": 0,
    "slug": "string",
    "status": 0,
    "request_id": "string",
    "suggested_fix": "string",
    "errors": [
      "string"
    ]
  }
}
{
  "error": {
    "message": "string",
    "code": 0,
    "slug": "string",
    "status": 0,
    "request_id": "string",
    "suggested_fix": "string",
    "errors": [
      "string"
    ]
  }
}
{
  "error": {
    "message": "string",
    "code": 0,
    "slug": "string",
    "status": 0,
    "request_id": "string",
    "suggested_fix": "string",
    "errors": [
      "string"
    ]
  }
}