Skip to main content
Glama
web-algebra-mcp

web-algebra-mcp

Official
by AtomGraph

ldh-AddXHTMLBlock

Appends a well-formed XHTML block as canonical XML to a LinkedDataHub document using sequence properties, with optional title, description, and fragment identifier.

Instructions

Appends an XHTML block to a LinkedDataHub document 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.

    IMPORTANT: The value parameter must be canonical XML literal - well-formed XHTML content
    that will be stored as rdf:XMLLiteral datatype.
    The top-level XHTML element must be <div xmlns="http://www.w3.org/1999/xhtml"></div>.
    The XHTML can use CSS classes for inline elements from Bootstrap 2.3.2, but no inline CSS styles.
    
    Canonical XML Rules (TL;DR):
    ✅ Well-formed XML - proper opening/closing tags, escaped special chars (&lt; &gt; &amp;)
    ✅ Attributes alphabetically ordered - <tag attr1="x" attr2="y"> not <tag attr2="y" attr1="x">
    ✅ No comments or processing instructions - strip <!-- --> and <?xml ?>
    ✅ Consistent encoding - UTF-8, normalized whitespace
    Bottom line: Valid XML + deterministic formatting = canonical XML.
    
    This tool:
    - Fetches the current document to find the next sequence number (rdf:_1, rdf:_2, etc.)
    - Creates an ldh:XHTML resource with rdf:value containing the XML literal
    - Posts the new XHTML block to the target document
    - Supports optional title, description, and fragment identifier
    
    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-AddXHTMLBlock"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlYesThe URI of the document to append the XHTML block to.
titleNoOptional title for the XHTML block.
valueYesXHTML content as canonical XML literal (must be well-formed XML).
fragmentNoOptional fragment identifier for the XHTML block URI (e.g., 'intro' creates #intro).
descriptionNoOptional description for the XHTML block.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.4

TDQS

A3.6/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 enumerates the internal steps (fetch document, compute next rdf:_N sequence number, create ldh:XHTML resource with rdf:value, post the block) and states the boolean return plus the caveat that the updated graph is not returned. It omits permission/auth requirements and whether sequence assignment is atomic under concurrency.

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

Conciseness3/5

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

Purpose is front-loaded, but the body is padded: the emoji checklist is followed by a redundant 'Bottom line: Valid XML + deterministic formatting = canonical XML' sentence, and the content-mode note is stated twice. The XML rules are worth keeping; the duplication and checklist formatting are not.

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 mutation tool with no annotations and no output schema, the definition covers side effects, sequence-number behavior, validation constraints, and the boolean return value, which is enough to call it correctly. The remaining gap is operational context: required permissions and what happens on partial failure.

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 five parameters, establishing a baseline of 3. The description adds real value for the critical `value` parameter (canonical XML, rdf:XMLLiteral datatype, required top-level <div xmlns=...>, Bootstrap 2.3.2 classes, no inline CSS), but title/description/fragment are only restated as 'optional' with no added meaning.

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?

Opens with a specific verb and resource: 'Appends an XHTML block to a LinkedDataHub document using sequence properties.' It also implies the boundary with object blocks via the content-mode note, but never names ldh-AddObjectBlock or another sibling as the alternative, so differentiation is left to inference.

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

Usage Guidelines3/5

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

The content-mode paragraph gives useful context (only XHTML and object blocks are displayed, other resources can still be added but won't render), which implies when this tool is appropriate. However, there is no explicit when-to-use/when-not-to-use statement and no named alternative for the non-displayable cases.

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