Skip to content
← Blog

Giving an AI agent thousands of tools with four

How the hoshime MCP server exposes every endpoint to Claude, Cursor and other agents without flooding the model's context.

1 min read#mcp#ai agents

The obvious way to put an API into an MCP server is one tool per endpoint. With thousands of endpoints, that breaks in two ways. Every tool definition is loaded into the model’s context before it reads a word of your question, and clients cap the number of tools they accept.

The hoshime MCP server has four tools instead: search, list, describe and call.

search_endpoints

The agent says what it needs in words: “earthquake indonesia”, “funding rate”, “youtube transcript”. The tool ranks endpoints by how well the platform name, endpoint name and summary match, weighs rare words more, and breaks ties by how often each endpoint is called. Each result comes with its id, summary, parameters, an example call that is known to work, whether it pages, and its units.

list_platforms

For browsing: platforms with their endpoint names, the most called first.

get_endpoint

One endpoint in full: its parameters as a JSON Schema, its cache time, and an outline of the data it returns, generated from the code that answers. The model reads the shape of the answer before it spends a unit.

call_endpoint

The call itself: endpoint as platform/name, and params. It runs exactly like the HTTP route, with the same validation, cache, proxy tiers and errors, and returns the same {data, meta} body. A failure is a tool result with the HTTP route’s problem details plus retryable and a hint, such as the endpoint’s parameter signature after a bad parameter, so the model can fix its own call.

Why it works

Discovery is free and small. The model spends a few hundred tokens finding the right endpoint instead of tens of thousands loading definitions it will never use. And because the server is built from the same registry as the HTTP API, a new endpoint is reachable from MCP the moment it ships.

Set it up in one command: see MCP server.

esc
↑↓ move↵ open