Skip to main content
Glama
MatthiasVanDE

jena-mcp-server

read_graph

Fetch an entire named graph as Turtle in a single HTTP request, bypassing the SPARQL parser for direct inspection or copying. A 404 means the graph holds no triples; use out_file for large graphs.

Instructions

Fetch one named graph whole, as Turtle.

One HTTP request, and it never touches the query parser -- the right way to read a graph you intend to inspect or copy. A CONSTRUCT returns the same triples but has to be parsed as a query first.

A 404 here means the graph holds no triples. That is not an error about the endpoint.

Graphs get large quickly; pass out_file for anything beyond a few hundred triples.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
graphNoGraph IRI. Omit for the default graph.
formatNoMedia type to request: text/turtle (default), application/n-triples, application/rdf+xml, application/ld+json.
datasetNoDataset name. Defaults to the configured one.
out_fileNoWrite to this path in the sandbox instead of returning the content.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.7/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses the single-HTTP-request cost, that it bypasses the query parser, and the important semantic that a 404 means an empty graph rather than an endpoint failure, plus a size warning. It does not address authentication, permissions, or behavior on a missing dataset, which a mutation-adjacent read on a shared store could reasonably mention.

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 front-loaded sentences, each carrying a distinct fact (what it fetches, why over CONSTRUCT, 404 meaning, size handling). Nothing is padding, even the clarifying line about 404 semantics earns its place.

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

Completeness5/5

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

For a read tool with no output schema, the description covers the return medium (Turtle), the error semantics (404 = empty graph), and the large-result escape hatch (out_file). An agent has everything needed to invoke it correctly.

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 baseline is 3, but the description adds real guidance: it states out_file should be used 'for anything beyond a few hundred triples' and confirms Turtle as the returned format, going beyond the schema's per-field text.

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 (Fetch) and resource (one named graph whole, as Turtle), and explicitly distinguishes itself from a CONSTRUCT query that 'returns the same triples but has to be parsed as a query first.' An agent can separate this from sparql_query, list_graphs, and write_graph without opening any schema.

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?

Provides an explicit when-to-use condition ('the right way to read a graph you intend to inspect or copy') and names the alternative approach (CONSTRUCT) with the tradeoff that selects it. Also gives a concrete threshold for the out_file parameter.

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