Skip to main content
Glama
web-algebra-mcp

web-algebra-mcp

Official
by AtomGraph

ldh-AddFile

Uploads a local file to a LinkedDataHub document as an RDF-described resource, stores the bytes in the uploads namespace, and returns the file URI for placement in content.

Instructions

Adds a file to a LinkedDataHub document via multipart RDF/POST.

    Appends `a nfo:FileDataObject ; nfo:fileName ; dct:title ; ...`
    to the target document and stores the file bytes at
    `<base>/uploads/{sha1}` (LDH's built-in upload namespace).
    The file is a resource the document holds, not one of its content blocks: to show it in the content mode,
    place it with ldh-AddObjectBlock, the returned `url` as its value.

    Arguments:
    - `url` — URI of the target document to add the file's description to.
    - `file` — absolute local file path. The bytes are read and streamed
      to the server.
    - `title` — human-readable title (`dct:title`).
    - `description` — optional description (`dct:description`).
    - `content_type` — optional MIME-type override; auto-detected from
      the file path if absent.

    Returns a result with `url` (the uploaded file's URI, as the document
    describes it after the upload: `<base>/uploads/{sha1}`, `<base>` being
    the application's base URI) and `status` (HTTP status code) bindings.
    Place the file in the content with ldh-AddObjectBlock, `url` as value.
    

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>",
      "file": "<file>",
      "title": "<title>"
    },
    "name": "ldh-AddFile"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlYesTarget document URI to add the file's description to.
fileYesAbsolute local file path. The bytes are read and uploaded.
titleYesTitle of the file (dct:title).
descriptionNoOptional description (dct:description).
content_typeNoOptional MIME-type override; auto-detected from path if absent.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.4

TDQS

A4.1/5.0
Behavior4/5

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

No annotations are supplied, so the description carries the full burden and does well: it discloses that the operation mutates the target document by appending triples, where bytes are stored (<base>/uploads/{sha1}), and the shape of the return value (url and status). It does not mention permissions/auth, size limits, or what happens when the same sha1 is uploaded twice, which are the notable remaining gaps.

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 content is front-loaded, starting with the operation and storage behavior before the argument list, and the argument breakdown is scannable. However, the instruction to place the file with ldh-AddObjectBlock is stated twice (once in the body, once in the return-value paragraph), which is avoidable repetition.

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 effects, storage location, parameter meanings, and return bindings, which is enough to invoke it correctly. Missing operational details such as authentication requirements and upload limits keep it short of complete.

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 description coverage is 100%, so all five parameters are already documented, and the description's argument list largely restates them with the same wording (local file path, optional MIME override, auto-detection). It adds only marginally more, such as noting bytes are streamed to the server, so the baseline of 3 applies.

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?

The description opens with a specific verb and resource ("Adds a file to a LinkedDataHub document") and immediately narrows the meaning of that addition: it appends RDF triples describing the file and stores bytes in the uploads namespace. It also distinguishes this tool from the sibling ldh-AddObjectBlock, so an agent can tell the two apart 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?

The description clearly states the primary use and names the alternative (ldh-AddObjectBlock) with the condition that selects it — showing the file in content mode. It lacks explicit when-not-to-use guidance (e.g., creating new documents or replacing existing files), but the central routing decision is covered.

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