Skip to main content
Glama

Ask documents

ask_documents
Read-only

Answer a question from your own documents (your knowledge base), citing its sources. Reads every matching document across all dates unless from/to narrow it. Returns a short written answer that cites its sources as [1], [2], and the evidence: each cited quote with its document id, metadata and score. Use search_documents instead when you want every match rather than an answer. Takes the same from, to, metadata, dry_run and read_limit_usd as search_documents; the limit includes the answer fee, and mode (fast reads only the best-matching results; complete reads every match; by default the question decides). coverage says how the answer read and how many documents.

Input Schema

NameRequiredDescriptionDefault
toNoOnly documents whose timestamp is before this: an ISO 8601 date-time, or a YYYY-MM-DD date (through its end, UTC).
fromNoOnly documents whose timestamp is at or after this: an ISO 8601 date-time, or a YYYY-MM-DD date (from its start, UTC).
modeNofast = read only the best-matching results (a lookup: quicker and cheaper, may miss matches). complete = read every matching document, up to read_limit_usd (lists, counts, "every" questions). Default: chosen from the question.
queryYesThe question, in plain language.
dry_runNotrue = return how many documents match and how many tokens this call would scan, and its price, without searching. Free; reads no text.
metadataNoExact metadata matches, e.g. {"client": "acme"}. A list matches any of its values.
read_limit_usdNoThe most this one call may spend from your balance, in US dollars. Over it, the best-matching documents are read first.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / from / anyOf
      Previous value: -[
      -  {
      -    "format": "date-time",
      -    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
      -    "type": "string"
      -  },
      -  {
      -    "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
      -    "type": "string"
      -  }
      -]New value: +[
      +  {
      +    "format": "date-time",
      +    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
      +    "type": "string"
      +  },
      +  {
      +    "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
      +    "type": "string"
      +  }
      +]
    • changedInput schema / properties / to / anyOf
      Previous value: -[
      -  {
      -    "format": "date-time",
      -    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
      -    "type": "string"
      -  },
      -  {
      -    "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
      -    "type": "string"
      -  }
      -]New value: +[
      +  {
      +    "format": "date-time",
      +    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
      +    "type": "string"
      +  },
      +  {
      +    "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
      +    "type": "string"
      +  }
      +]
  2. Changed1 schema field changed
    • addedInput schema / properties / mode
      Added value: +{
      +  "description": "fast = read only the best-matching results (a lookup: quicker and cheaper, may miss matches). complete = read every matching document, up to read_limit_usd (lists, counts, \"every\" questions). Default: chosen from the question.",
      +  "enum": [
      +    "fast",
      +    "complete"
      +  ],
      +  "type": "string"
      +}
  3. Changed4 schema fields changed
    • changedInput schema / properties / dry_run / description
      Previous value: -"true = return how many documents match and the tokens and price this query would scan. Free; reads no text."New value: +"true = return how many documents match and how many tokens this call would scan, and its price, without searching. Free; reads no text."
    • changedInput schema / properties / read_limit_usd / description
      Previous value: -"The most this call may cost, in US dollars. Default 1. Over it, the best-matching documents are read first."New value: +"The most this one call may spend from your balance, in US dollars. Over it, the best-matching documents are read first."
    • removedInput schema / properties / since
      Removed value: -{
      -  "anyOf": [
      -    {
      -      "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
      -      "type": "string"
      -    },
      -    {
      -      "type": "null"
      -    }
      -  ],
      -  "description": "Optional, older form of from. YYYY-MM-DD: only read documents dated on or after this day."
      -}
    • removedInput schema / properties / until
      Removed value: -{
      -  "anyOf": [
      -    {
      -      "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
      -      "type": "string"
      -    },
      -    {
      -      "type": "null"
      -    }
      -  ],
      -  "description": "Optional, older form of to. YYYY-MM-DD: only read documents dated on or before this day."
      -}
  4. Added

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare read-only, non-destructive, closed-world behavior, and the description adds materially: the return shape (short answer with [1], [2] citations plus each cited quote with document id, metadata and score), the cost model (read_limit_usd includes the answer fee, best matches read first), and what coverage reports. It stops short of stating failure modes or what dry_run returns beyond the schema, so not a full 5.

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 purpose and the sibling routing, and nearly every clause carries information (return shape, cost, mode, coverage). The final parenthetical about mode and the trailing clause about coverage are dense and slightly run-on, costing a point.

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?

With seven parameters, nested metadata, and no output schema, the description does the heavy lifting well: it describes the returned answer, the evidence array, cost accounting, and the coverage field. Minor gaps remain around error/empty-result behavior and exactly what coverage's values look like.

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

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3; the description still adds value by declaring that from, to, metadata, dry_run and read_limit_usd are shared with search_documents and that the USD limit also covers the answer fee. The mode explanation largely restates the enum documentation, which caps this at 4.

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?

States a specific verb and resource ('answer a question from your own documents'), plus the distinguishing output (a cited written answer with evidence). It explicitly separates itself from search_documents, so an agent can pick between them 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 Guidelines5/5

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

Names the alternative and the exact condition that selects it: 'Use search_documents instead when you want every match rather than an answer.' It also gives when-to-choose guidance for mode (fast = lookup, complete = lists/counts/'every' questions) and notes that from/to narrow an otherwise all-dates read.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources