Skip to main content
Glama
MatthiasVanDE

jena-mcp-server

sparql_update

Executes SPARQL Update statements against a Jena Fuseki dataset to insert, delete, load, clear, create, drop, copy, move or add triples and named graphs.

Instructions

Run a SPARQL Update: INSERT, DELETE, LOAD, CLEAR, CREATE, DROP, COPY, MOVE or ADD.

To create a named graph, insert into it: INSERT DATA { GRAPH { "o" } }

CREATE GRAPH on its own is not enough on TDB2. It answers 200, but a graph with no triples does not exist as far as anything else is concerned -- list_graphs will not show it and the Graph Store Protocol answers 404 for it.

For replacing a whole graph from a file, write_graph and load_rdf_file are better: they do not put the RDF through this conversation.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
updateYesThe SPARQL Update statement.
datasetNoDataset name. Defaults to the configured one.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.1/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It discloses a genuinely useful behavioral quirk (CREATE GRAPH returns 200 but the empty graph is invisible to list_graphs and yields 404 via GSP). But it never warns that DROP, CLEAR, and DELETE are irreversible, nor mentions permissions or transaction semantics — significant omissions for a mutation tool with zero annotation coverage.

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

Conciseness4/5

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

Front-loaded with the core capability, then a worked example, then the TDB2 caveat, then alternatives — a sensible priority order. The TDB2 paragraph is slightly verbose (repeats the 'graph does not exist' idea three ways) but each sentence carries actionable information.

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 2-parameter tool with no output schema and no annotations, the description covers operation semantics, a syntax example, a platform-specific pitfall, and alternative tools. It is missing only response/error shape and permission or transaction expectations, which the absence of an output schema makes somewhat forgivable.

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 is 3, and the description earns an extra point by embedding a concrete 'INSERT DATA { GRAPH <iri> { <s> <p> "o" } }' example that demonstrates the expected syntax of the `update` string. It adds no detail on the `dataset` parameter beyond the schema's default behavior note.

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 a SPARQL Update') and enumerates the exact operation families (INSERT, DELETE, LOAD, CLEAR, CREATE, DROP, COPY, MOVE, ADD), which distinguishes it cleanly from the read-oriented sparql_query sibling. An agent can tell what class of operation this tool executes without opening the schema.

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 an explicit routing rule with named alternatives: 'For replacing a whole graph from a file, write_graph and load_rdf_file are better.' It also warns when a naive approach fails (CREATE GRAPH alone on TDB2). It does not, however, state the complementary case — that read-only queries belong to sparql_query — leaving that inference to the agent.

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