Skip to main content
Glama
web-algebra-mcp

web-algebra-mcp

Official
by AtomGraph

ldh-AddObjectBlock

Appends an object block to a LinkedDataHub document using sequence properties, referencing an external resource by URI with optional title, description, fragment, and display mode.

Instructions

Appends an object block to a LinkedDataHub document content mode using sequence properties. Only XHTML blocks and object blocks are shown in the content mode. Other resources can still be added to the document, but they will not be displayed in the content mode.

    Object blocks reference external resources via URI and can have different display modes.
    Only RDF Linked Data objects can be rendered by using display modes, so if you think you're using an RDF URI value, make sure it returns a valid RDF resource (e.g. use the GET operation to verify).
    Non-RDF resources (for example images) will be embedded using HTML <object> element.

    Possible display modes include:
    - https://w3id.org/atomgraph/client#ReadMode: Default mode for displaying the object.
    - https://w3id.org/atomgraph/client#GraphMode: Displays the object as a graph.
    - https://w3id.org/atomgraph/client#MapMode: Displays the object as a map.
    - https://w3id.org/atomgraph/client#ChartMode: Displays the object as a chart.
    
    This tool:
    - Fetches the current document to find the next sequence number (rdf:_1, rdf:_2, etc.)
    - Creates an ldh:Object resource with rdf:value pointing to the target resource URI
    - Posts the new object block to the target document
    - Supports optional title, description, fragment identifier, and display mode
    
    Returns True if the operation was successful, False otherwise.
    Note: This operation does not return the updated graph, it only confirms the success of the operation.
    

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": {
      "url": "<url>",
      "value": "<value>"
    },
    "name": "ldh-AddObjectBlock"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlYesThe URI of the document to append the object block to.
modeNoOptional URI of the mode the block shows its resource in (an object mode, not a view's layout). Defaults to ReadMode.https://w3id.org/atomgraph/client#ReadMode
graphNoOptional URI of the document that describes the value, read in place of dereferencing the value's URI (ldh:graph).
titleNoOptional title for the object block.
valueYesURI of the object resource to reference.
fragmentNoOptional fragment identifier for the object block URI (e.g., 'intro' creates #intro).
descriptionNoOptional description for the object block.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.4

TDQS

A3.9/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 internal sequence (fetch document, find next rdf:_N, create ldh:Object with rdf:value, post), the mutation performed, and that it returns True/False rather than the updated graph. It omits permission/auth requirements and what happens on failure or sequence conflicts.

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 action, then organized into scannable sections for display modes and the internal step sequence. Slight redundancy exists where the four display mode URIs repeat what the schema enum already declares.

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 7-parameter mutation tool with no output schema, the description covers the important behavior: what gets created, how sequence numbering works, and that the return value is only a success boolean. Remaining gaps are authorization requirements and error semantics, which are non-trivial for a write operation but secondary to correct invocation.

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

Parameters3/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 all seven parameters, including the mode enum. The description adds some value by explaining what each display mode renders and that non-RDF resources are embedded via HTML <object>, but the ldh:graph parameter is never discussed and the mode list largely duplicates the enum.

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

Purpose4/5

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

States a specific verb and resource: appends an object block to a LinkedDataHub document content mode using sequence properties. It also distinguishes object blocks (external URI references) from XHTML blocks, but does not explicitly route the agent away from other Add* siblings such as ldh-AddConstruct or ldh-AddFile.

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 actionable context: object blocks reference external resources via URI, only XHTML and object blocks render in content mode, and RDF values should be verified with GET before use. It never explicitly says when to pick this over ldh-AddXHTMLBlock or ldh-AddFile, so the alternative-selection guidance is implied rather than stated.

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