Skip to main content
Glama
Context-MCP Document Server

Context-MCP Document Server

by lxgbrl

add_document

Index a PDF, DOCX, Markdown, HTML, TXT, or JSON file from an absolute path to make it searchable and retrievable, with optional tags and title for organization.

Instructions

Add a document to the index from a file path. Supports PDF, DOCX, Markdown, HTML, TXT, and JSON files.

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": {
      "path": "<path>"
    },
    "name": "add_document"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesAbsolute path to the document file
tagsNoOptional tags for categorization
titleNoOptional custom title (defaults to filename)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.3/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It discloses supported formats, but says nothing about whether indexing is synchronous, whether adding an existing document creates a duplicate or overwrites it, what permissions or size limits apply, or what the operation returns for follow-up calls.

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

Conciseness5/5

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

Two short sentences with zero filler: the core action is front-loaded and the format list is a useful qualifier. Nothing repeats or pads the name or title.

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 write-side ingestion tool with no annotations and no output schema, the definition covers inputs and accepted formats but omits duplicate-handling, whether the document is immediately searchable, and any return identifier needed to chain into get_document. Adequate but with clear gaps.

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%, with all three parameters documented (path, tags, title), so the schema already does the heavy lifting. The description adds minor value by tying 'path' to supported file formats, which is the only semantic detail beyond the schema.

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 ('Add a document to the index') plus the source ('from a file path'), and enumerates accepted formats. It does not explicitly differentiate itself from siblings such as update_document, but the verb is clear enough that an agent can pick it over get/list/search/delete.

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?

Usage is only implied by the phrase 'to the index', which tells the agent this is the ingestion entry point rather than a search or retrieval call. There is no explicit guidance on when to prefer update_document over re-adding, nor on what happens with duplicates or unsupported file types.

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