Skip to main content
Glama
llmstxt-doc-search

llmstxt-doc-search

by praveenc

Add doc source

add_doc_source

Register and index a new llms.txt documentation source at runtime so custom docs sites become searchable in future runs.

Instructions

Register a new llms.txt source at runtime and index it. Persisted for future runs.

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": {
      "name": "<name>",
      "llms_txt_url": "<llms_txt_url>"
    },
    "name": "add_doc_source"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYesShort id, e.g. 'langgraph'
confirmNoSet true to confirm the add when the client cancels the confirmation prompt.
llms_txt_urlYesURL of the source's llms.txt (https)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.1.0
    • addedInput schema / properties / confirm
      Added value: +{
      +  "description": "Set true to confirm the add when the client cancels the confirmation prompt.",
      +  "type": "boolean"
      +}
  2. Changed2 schema fields changedv1.0.0
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • removedInput schema / additionalProperties
      Removed value: -false
  3. First observedv0.1.0

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false, openWorldHint=true, idempotentHint=false, and destructiveHint=false. The description adds real value on top: it discloses that indexing happens as a side effect and that the registration is persisted across runs. It does not address whether re-adding the same name duplicates state (relevant given idempotentHint=false) or how indexing failures surface.

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 no filler; the action and its immediate effect lead, and the persistence note follows as supporting context. Nothing could be removed without losing information.

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?

With no output schema, the description is the only place an agent learns what happens on success, and it does state registration, indexing, and persistence. It is thin for a non-idempotent mutation though: duplicate handling, indexing duration/failure modes, and whether the tool returns an identifier are all unaddressed.

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 three parameters including the confirm flag are already documented in the schema. The description adds no format, validation, or naming-convention detail beyond that, so the baseline of 3 applies.

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?

Uses a specific verb ('Register') on a specific resource ('a new llms.txt source') and adds the immediate consequence ('and index it'), which separates it from refresh_doc_source, remove_doc_source, and list_doc_sources. It stops short of naming a sibling explicitly, so it is clear but not maximally differentiated.

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 word 'new' implies this is for sources not yet registered, which is a reasonable cue against refresh_doc_source. However, there is no explicit when-to-use/when-not statement, no prerequisite about obtaining an llms.txt URL, and no guidance on what to do if the source already exists.

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