Skip to main content
Glama

SPARQLクエリを実行する

sparql
Read-only

SPARQLのSELECTかASKを1つのデータに送り、結果を表で返す。接頭辞は describe_dataset に出るものなら宣言なしで使える。LIMITがなければ50を付ける。書く前に describe_dataset でクラスとクエリ例を確認すること。複数のデータをまたぐときは、1つ目の結果のURIを VALUES に入れて2つ目に送る。

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": {
      "dataset": "<dataset>",
      "query": "<query>"
    },
    "name": "sparql"
  }
}

Input Schema

NameRequiredDescriptionDefault
queryYesSPARQLクエリ(SELECT か ASK)
datasetYesデータのid。list_datasetsで一覧を取得できる

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=true, so safety is covered. The description adds real behavioral detail beyond that: an implicit LIMIT 50 is appended when missing, prefixes appearing in describe_dataset may be used undeclared, and results come back as a table. It does not mention error behavior or result-size limits beyond the LIMIT default.

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?

Four short sentences, each carrying distinct information: capability, prefix rule, LIMIT default, prerequisite, and multi-dataset pattern. The capability statement is front-loaded and nothing is repeated from the schema verbatim.

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?

For a two-parameter query tool with no output schema, the definition covers the important gotchas: query-type restriction, default LIMIT, prefix resolution, and the multi-dataset workflow. Return values are summarized only as 'a table', which is thin but acceptable given the free-form result shape.

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 schema already documents both parameters, making 3 the baseline. The description goes further by explaining that dataset-specific prefixes are usable without declaration and by outlining the VALUES pattern for multi-dataset queries, which is meaning the enum cannot convey.

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?

The description names a specific verb and resource (sends a SPARQL SELECT or ASK query to one dataset) and states the output form (a table). It narrows scope to query types SELECT and ASK and to a single dataset, setting it apart from describe_dataset and list_datasets by what it actually executes.

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

Usage Guidelines5/5

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

It gives an explicit prerequisite ('describe_dataset でクラスとクエリ例を確認すること') before writing a query, plus a concrete cross-dataset procedure: send the first query, then put the resulting URIs into VALUES for the second dataset. The 'only SELECT or ASK' constraint also tells the agent what is excluded.

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.