Skip to main content
Glama
web-algebra-mcp

web-algebra-mcp

Official
by AtomGraph

Values

Restricts a SPARQL query's variables to the rows of another query's result set by joining an inline block into every group, so one query is constrained by or batched over another's results.

Instructions

Restricts variables of a SPARQL query or update to the rows of a SPARQL result set, so one query is constrained by, or batched over, the results of another: an inline VALUES block with the rows is joined into every group of the query. The variables stay variables (still projected, still in templates). Columns default to the result's variables; vars selects and orders them; a row that does not bind a column leaves it free (UNDEF). Subqueries that do not project a column keep their own copy; the query must not assign a restricted variable itself (AS or VALUES). Blank nodes are rejected. Substitute is the one-variable, one-value case.

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": {
      "query": "<query>",
      "data": "<data>"
    },
    "name": "Values"
  }
}

Input Schema

NameRequiredDescriptionDefault
dataYesA SPARQL result set (as produced by SELECT) whose variables and rows become the VALUES block. The variable names must match those used in the query.
varsNoOptional subset and ordering of variable names to emit as columns. Defaults to all variables of the result set.
queryYesThe SPARQL query or update whose variables are restricted. It must not assign them itself (AS, VALUES).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.4

TDQS

A4.2/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 so well: it discloses the join-into-every-group semantics, that variables remain projected and usable in templates, UNDEF behavior for unbound rows, subquery scoping, and rejection rules. It stops short of describing failure output or the exact shape of the returned value.

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?

The core purpose is front-loaded in the first clause, and the following sentences each add distinct semantics (projection, UNDEF, subqueries, restrictions). It is dense but mostly earns its length; a light structural break would improve scanability.

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

Completeness3/5

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

For a semantically complex, three-parameter tool with no output schema and no annotations, the description covers input behavior thoroughly. However, it never states what the tool returns (presumably the rewritten query), which is a meaningful omission when no output schema exists to fill the gap.

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 meaning: vars selects and orders columns rather than merely defaulting, and an unbound column leaves the variable free (UNDEF). The data parameter's row-to-VALUES mapping and the query's no-self-assignment constraint are also reinforced beyond the schema 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 precise verb and resource: it restricts SPARQL query/update variables to the rows of a result set by joining an inline VALUES block into every group. It explicitly contrasts itself with the sibling Substitute as the one-variable, one-value case, so an agent can pick between them without opening either 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?

It gives clear usage context (constraining or batching one query over another's results) and routes the single-variable case to Substitute. It also states hard preconditions (query must not assign the restricted variable via AS or VALUES; blank nodes rejected), but does not spell out an explicit when-not-to-use beyond those constraints.

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