Discover MCP Tools for a Policy
Endpoint
POST /apiops/projects/{projectName}/apiProxies/{apiProxyName}/policies/{policyName}/parse-tools/
Bridges the same "Discover / Reparse Tools" action the Manager UI's policy editor exposes to a token-authenticated APIops call, so a CI/CD pipeline can preview an inline MCP server's tool catalog without a browser session. This is the policy-embedded counterpart of a Passthrough proxy's own discovery — see MCP Gateway.
Nothing is persisted. The policy's mcpServer.discoveredTools is unchanged by this call — it only
returns what a live probe finds. To actually update the approved catalog, save the discovered tools
back onto the policy through Update Policy.
Authentication
Requires a Personal API Access Token.
Permission: API_MANAGEMENT × MANAGE.
Header
Authorization: Bearer YOUR_TOKEN
Request
Headers
| Header | Value | Required |
|---|---|---|
| Authorization | Bearer {token} | Yes |
| Content-Type | application/json | No (only needed when sending probeOverride) |
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| projectName | string | Yes | Project name |
| apiProxyName | string | Yes | API Proxy that owns the policy |
| policyName | string | Yes | Name of an existing policy-ai-mcp-tool-call or policy-ai-mcp-tool-invoke policy on that proxy |
Request Body
Optional. Omitted, the policy's persisted inline mcpServer is probed as-is (its stored
credentials are decrypted server-side for the probe only). Supplied, the given fields override the
persisted ones for this probe — the same ABSENT-vs-EMPTY convention a policy update uses: an omitted
secret field (bearerToken, clientSecret) is preserved from the persisted server and never sent
back blank.
Example — probe the persisted server as-is
{}
Example — probe against a different endpoint for this call only
{
"endpoint": "https://mcp-staging.example.com/mcp",
"authScheme": "BEARER",
"bearerToken": "staging-only-token"
}
Response
Success Response (200 OK)
{
"status": "SUCCESS",
"pinnedCatalogHash": "3f9a...c21",
"parsedAt": "2026-08-09T10:15:00Z",
"resultList": [
{
"name": "search",
"description": "Full-text search across the knowledge base",
"inputSchema": "{\"type\":\"object\",\"properties\":{\"query\":{\"type\":\"string\"}}}",
"type": "tool",
"connectionId": "6a3a470a8f879c08e1b76301",
"cachedAt": "2026-08-09T10:15:00Z"
}
],
"resultCount": 1
}
Response Fields
| Field | Type | Description |
|---|---|---|
| pinnedCatalogHash | string | Fingerprint of this probe's tool catalog (name + canonicalized input schema, order-insensitive) — compare against the policy's currently persisted hash to see whether the live server has drifted |
| parsedAt | string | Timestamp of this probe |
| resultList | array | One entry per discovered tool: name, description, inputSchema (stringified JSON Schema), type (always tool), connectionId, cachedAt |
Error Response (400 Bad Request) — Wrong Policy Type
{
"status": "FAILURE",
"resultMessage": "Policy (name: my-policy) is not a PolicyAiMcpToolCall/PolicyAiMcpToolInvoke!"
}
Error Response (400 Bad Request) — Discovery Failure
Operational discovery failures (server unreachable, tools/list rejected, malformed response) are
caller-actionable and returned as 400, not 500.
Error Response (401 Unauthorized)
{
"status": "FAILURE",
"resultMessage": "Token is not valid!"
}
cURL Example
curl -X POST \
"https://demo.apinizer.com/apiops/projects/MyProject/apiProxies/MyAgentProxy/policies/mcp-tool-call/parse-tools/" \
-H "Authorization: Bearer YOUR_TOKEN"
Permissions
- User must have
API_MANAGEMENT+MANAGEpermission in the project
Notes and Warnings
- Preview-only, on purpose. It never writes to the policy. To persist a fresh catalog, apply it through a normal policy update.
- Widened auth vs. the Manager UI's own JWT-authenticated twin. The Manager UI calls the same
underlying discovery through a JWT session gated by
AI_DEVELOPMENT× MANAGE; this APIops bridge usesAPI_MANAGEMENT× MANAGE instead, consistent with every other write-capable APIops endpoint in this resource. - See Discover A2A Skills for a Policy for the A2A equivalent.