Skip to main content
Glama

bank-of-japan-mcp-server

Boj Dataframe Query

boj_dataframe_query
Read-onlyIdempotent

Run one read-only SELECT, optionally with CTEs, over staged BOJ tables. Use boj_dataframe_describe to discover table and column names. Give result columns distinct names and add a top-level ORDER BY with deterministic tie-breakers to page results.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "canvas_id": "<canvas_id>",
      "sql": "<sql>"
    },
    "name": "boj_dataframe_query"
  }
}

Input Schema

NameRequiredDescriptionDefault
sqlYesRead-only DuckDB SELECT or WITH ... SELECT, up to 65,536 UTF-16 code units.
limitNoResult rows per page, capped at 1,000.
cursorNoContinuation from the same canvas, SQL, and limit.
canvas_idYesCanvas ID as an earlier response on this server returned it — exactly 10 characters of letters, digits, hyphens, and underscores.

Output Schema

NameRequiredDescriptionDefault
hintNoHow to retrieve the remaining rows of an unordered query.
rowsNoResult rows for this page.
errorNoPresent when the call failed. Absent on success.
columnsNoResult column names in SELECT order.
has_moreNoWhether more rows matched after this page.
truncatedNoWhether unordered matches were omitted without a continuation.
attributionNoBank of Japan source credit.
next_cursorNoContinuation for an ordered query with more rows.
applied_limitNoApplied rows per page after the cap.
returned_countNoExact number of rows returned on this page.
requested_limitNoRequested result rows per page, including the default.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnly, idempotent, and closed-world, so the safety profile is covered. The description adds useful behavior beyond that: CTE support, the requirement for distinct result column names, and the deterministic ORDER BY tie-breaker rule needed for stable paging — real operational guidance rather than a restatement of annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three short sentences, front-loaded with the core operation, then the prerequisite tool, then the paging constraint. No filler, no restatement of the title.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists, so return values need not be explained, and the schema covers limits, cursor, and canvas_id. What remains thin is failure behavior (what happens on non-SELECT input or a stale cursor), but for a read-only query tool the definition is essentially complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline would be 3. The description earns the bump by explaining the paging contract implicitly: deterministic top-level ordering is what makes limit/cursor continuation safe, and distinct column names avoid ambiguity in results — meaning the schema's field descriptions do not supply.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource: run one read-only SELECT (with optional CTEs) over staged BOJ tables. It also names the sibling boj_dataframe_describe as the discovery step, so an agent can separate querying from schema inspection without opening another definition.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives clear context: this is the execution step, and table/column names come from boj_dataframe_describe first. It does not state when to prefer this over the domain-specific siblings (e.g. boj_get_series_observations), but the read-only SQL scope is unambiguous.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.