---
title: "Call a hosted tool by name"
method: POST
path: "/tools/{name}"
tags: ["Tools"]
---

# Call a hosted tool by name

`POST /tools/{name}`

## Request

- Base URL: `https://api.bankstatemently.com/v1`
- URL: `https://api.bankstatemently.com/v1/tools/{name}`
- Auth: API key in header `X-API-Key`

Dispatches a `tools/call` against the SAME tool registry the hosted MCP server (`/mcp`) and the self-contained stdio server (`@bankstatemently/mcp`) serve — the generic surface a local/offline MCP client uses to reach every hosted tool without a bespoke per-tool REST endpoint. Returns the tool's result verbatim: `content`, `structuredContent`, `isError`, `_meta`. HTTP 200 whether the tool itself succeeded or failed — MCP tool failures are results, never a distinct HTTP status. Rate limit: 60 requests per minute.

## Path parameters

- `name` string, required

## Request body

- object: The named tool's own arguments, exactly as documented by `tools/list`'s per-tool `inputSchema`. No fixed shape is declared here — every tool has a different one.

## Response `200`

The tool's CallToolResult, unwrapped by no one.

- object
  - `content` unknown[], required: MCP content blocks — text/structured content the tool produced.
    - unknown
  - `structuredContent` object: The tool's structured (JSON) result, when it declares an outputSchema.
  - `isError` boolean: True when the tool itself failed (auth required, invalid arguments, downstream error) — still HTTP 200.
  - `_meta` object: Protocol metadata, e.g. the auth-error `mcp/www_authenticate` hint.

## Other responses

- `401`: Authentication failed, API key revoked, or API key expired.
- `404`: The requested endpoint does not exist.
- `429`: Too many requests. Wait the number of seconds indicated by the `Retry-After` header.
- `500`: An unexpected server error occurred.

---

[API](https://skmtc.dev/bankstatemently/apis/bankstatemently-api.md) · [All operations](https://skmtc.dev/bankstatemently/apis/bankstatemently-api/llms.txt) · [OpenAPI document](https://skmtc.dev/bankstatemently/apis/bankstatemently-api/revisions/4c3b7fb26edf?raw)
