# Custom query tools name or link the target API

**If a tool accepts free-form endpoint paths, query strings or request bodies, its description must link to or name the target API; the Anthropic checklist gives "Makes a request to the API" as a description that fails.**

Check `anthropic-api-docs` · Anthropic connector directory · default severity: blocking · rubric 2.1.0. Last verified against Anthropic connector pre-submission checklist on 2026-11-18.

## What fails

The tool takes a free-form path, endpoint, request body or query language (SQL, GraphQL and similar), and its description neither links nor names the API. The checklist gives "Makes a request to the API" as a description that fails.

## The rule

> If a tool accepts freeform endpoint paths, query strings, or request bodies that the caller constructs, its description must include a link to or the explicit name of the target API.

Source: [Anthropic connector pre-submission checklist](https://claude.com/docs/connectors/building/review-criteria#reference-api-docs-in-custom-query-tools)

## How to fix it

Name and link the API in the description, for example "Queries the Slack Web API, see https://api.slack.com/methods".

1. Name the API and link its reference in the description: "Queries the Acme REST API, see https://api.example.com/docs".
2. For query languages, name the dialect and schema: "PostgreSQL, read-only, tables listed by list_tables".
3. Keep the link stable and public.

### TypeScript SDK

```ts
import { McpServer } from '@modelcontextprotocol/server';
import * as z from 'zod';

const server = new McpServer({ name: 'issues', version: '1.0.0' });

server.registerTool(
  'run_query',
  {
    title: 'Run read-only query',
    description: 'Run one read-only PostgreSQL SELECT on the analytics database (docs: https://www.postgresql.org/docs/current/sql-select.html). Use when the user asks a question the other tools cannot answer.',
    inputSchema: z.strictObject({
      sql: z.string().describe('One SELECT statement; tables are listed by list_tables'),
    }),
    annotations: { readOnlyHint: true, destructiveHint: false, openWorldHint: false },
  },
  async ({ sql }) => ({ content: [{ type: 'text', text: 'Done' }] }),
);
```

### Python SDK

```python
from typing import Annotated

from pydantic import Field
from mcp.server.mcpserver import MCPServer
from mcp.types import ToolAnnotations

server = MCPServer("issues")

@server.tool(
    title="Run read-only query",
    annotations=ToolAnnotations(readOnlyHint=True, destructiveHint=False, openWorldHint=False),
)
def run_query(
    sql: Annotated[str, Field(description="One SELECT statement; tables are listed by list_tables")],
) -> str:
    """Run one read-only PostgreSQL SELECT on the analytics database (docs: https://www.postgresql.org/docs/current/sql-select.html). Use when the user asks a question the other tools cannot answer."""
    return "Done"
```

## Questions

### Why does the API name matter?

The model builds the path or query itself, so it needs to know which API’s conventions to follow. Reviewers need it to judge what the tool can reach.

### Is a link enough without the name?

The checklist accepts either a link or the explicit name. Both is best.

## Related checks

- [Reads and writes are separate tools](https://isokron.ai/mcp-check/checks/anthropic-read-write-split)
- [Description says what the tool does and when to use it](https://isokron.ai/mcp-check/checks/anthropic-description)
- [No generic executor or operation dispatcher](https://isokron.ai/mcp-check/checks/openai-generic-executor)
- [Directory review rules for MCP tools](https://isokron.ai/mcp-check/checks/directories)

Counts toward: Anthropic connector directory.

Rubric: https://isokron.ai/mcp-check/rubric

Check your tool list: https://isokron.ai/mcp-check
