Building tools

Adding REST API tools

How easyMCP maps REST endpoints into MCP tool calls — and the small details that make tool-calling reliable.

From OpenAPI

If your API has an OpenAPI / Swagger spec, paste the URL and easyMCP imports every operation as a separate tool with the schema, parameters, and descriptions already filled in.

Manually

For unspecified APIs, define the tool by hand:

  • Name — snake_case, short, action-oriented (get_user, not userEndpoint)
  • Description — one sentence the model will see. Include when to use it
  • Parameters — JSON Schema. Mark required fields explicitly

Authentication

Headers can use template variables like {{API_KEY}}. easyMCP substitutes them at call time from project secrets or per-end-user credentials. See Authentication overview.

Response shaping

Most APIs return more data than the model needs. Use the Response template field to extract just the fields that matter — smaller responses mean faster, more accurate tool calls.