Skip to main content
Glama

Get Document Info

get_document_info
Read-onlyIdempotent

Retrieve document metadata (title, word count, synopsis, label, status, parent, custom fields) without reading the full body text. Inspect document details efficiently.

Instructions

Return metadata for a single document without its body text: title, type, word count, synopsis, label, status, parent, and custom metadata. Use this to inspect a document or to read its word count cheaply; call read_document when you need the actual prose, or get_structure for the whole binder. Requires an open project and a valid document id.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
documentIdYesScrivener document UUID, as returned by get_structure (a binder item "id").

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesAncestor chain from the binder root to the document.
documentYesThe document metadata (body text excluded).
locationYesWhere the document lives: "active", "trash", or "unknown".
metadataYesDerived metadata map (synopsis, notes, keywords, status, label) as strings.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / documentId / description
      Added value: +"Scrivener document UUID, as returned by get_structure (a binder item \"id\")."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "document": {
      +      "description": "The document metadata (body text excluded).",
      +      "properties": {
      +        "customMetadata": {
      +          "description": "Map of custom metadata field names to string values.",
      +          "type": "object"
      +        },
      +        "id": {
      +          "description": "Scrivener UUID of the document.",
      +          "type": "string"
      +        },
      +        "includeInCompile": {
      +          "description": "Whether the document is included in compile.",
      +          "type": "boolean"
      +        },
      +        "keywords": {
      +          "description": "Keywords assigned to the document.",
      +          "items": {
      +            "type": "string"
      +          },
      +          "type": "array"
      +        },
      +        "label": {
      +          "description": "Label name, if set.",
      +          "type": "string"
      +        },
      +        "notes": {
      +          "description": "Inspector notes, if set.",
      +          "type": "string"
      +        },
      +        "path": {
      +          "description": "Binder path of the document.",
      +          "type": "string"
      +        },
      +        "status": {
      +          "description": "Status name, if set.",
      +          "type": "string"
      +        },
      +        "synopsis": {
      +          "description": "Synopsis / index-card text, if set.",
      +          "type": "string"
      +        },
      +        "title": {
      +          "description": "Document title.",
      +          "type": "string"
      +        },
      +        "type": {
      +          "description": "Item type: \"Text\", \"Folder\", or \"Other\".",
      +          "type": "string"
      +        },
      +        "wordCount": {
      +          "description": "Word count of the document body.",
      +          "type": "number"
      +        }
      +      },
      +      "required": [
      +        "id",
      +        "title",
      +        "type",
      +        "path"
      +      ],
      +      "type": "object"
      +    },
      +    "location": {
      +      "description": "Where the document lives: \"active\", \"trash\", or \"unknown\".",
      +      "type": "string"
      +    },
      +    "metadata": {
      +      "description": "Derived metadata map (synopsis, notes, keywords, status, label) as strings.",
      +      "type": "object"
      +    },
      +    "path": {
      +      "description": "Ancestor chain from the binder root to the document.",
      +      "items": {
      +        "properties": {
      +          "id": {
      +            "description": "UUID of the ancestor binder item.",
      +            "type": "string"
      +          },
      +          "title": {
      +            "description": "Title of the ancestor item.",
      +            "type": "string"
      +          },
      +          "type": {
      +            "description": "Type of the ancestor item.",
      +            "type": "string"
      +          }
      +        },
      +        "type": "object"
      +      },
      +      "type": "array"
      +    }
      +  },
      +  "required": [
      +    "document",
      +    "path",
      +    "metadata",
      +    "location"
      +  ],
      +  "type": "object"
      +}
  2. First observedv0.6.0

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already mark it as read-only and idempotent. Description adds that it does not return body text, which is critical for understanding its non-destructive nature and the 'cheaply' hint implies low computational cost.

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 sentences: first states what it does and what metadata it returns, second provides usage guidance. No wasted words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Output schema exists, so return values are documented elsewhere. Description covers purpose, scope, limitations, and prerequisites. Complete for a simple metadata retrieval tool.

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?

Single parameter 'documentId' has schema description identifying it as a Scrivener document UUID from get_structure. Description mentions referencing get_structure but adds no further semantic nuance beyond schema (100% coverage).

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?

Description clearly states it returns metadata without body text, lists specific fields (title, type, word count, etc.), and distinguishes from siblings read_document and get_structure by contrasting use cases.

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?

Explicitly says when to use (inspect document, cheaply read word count) and when not to (use read_document for prose, get_structure for binder). Also states prerequisite: open project and valid document id.

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