Skip to main content
Glama

docx-queryObjects

Retrieve top-level object information by ID from Word documents to inspect document structure and content elements.

Instructions

List top-level object info by id.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYes

Implementation Reference

  • Core implementation of queryObjects in DocRegistry: maps document content to array of {index, type} and returns with count.
    queryObjects(id: DocId) {
      const cur = this.require(id);
      // Return a simplified view of objects from JSON (paragraphs, tables, images)
      const objects = cur.json.content.map((block, idx) => ({
        index: idx,
        type: block.type,
      }));
      return { count: objects.length, objects };
    }
  • MCP server switch case handler for docx-queryObjects: validates input and calls registry.queryObjects(id).
    case "docx-queryObjects": {
      const { id } = parseArgs<{ id: string }>(args, tools["docx-queryObjects"].inputSchema);
      return ok(registry.queryObjects(id));
    }
  • src/index.ts:53-56 (registration)
    Tool registration in tools object: defines name, description, and inputSchema requiring 'id' string.
    "docx-queryObjects": {
      description: "List top-level object info by id.",
      inputSchema: { type: "object", required: ["id"], properties: { id: { type: "string" } } }
    },
  • Input schema for the tool: object with required 'id' property of type string.
      inputSchema: { type: "object", required: ["id"], properties: { id: { type: "string" } } }
    },
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 of behavioral disclosure. 'List' implies a read-only operation, but it doesn't specify permissions, rate limits, side effects, or what 'top-level object info' includes (e.g., format, scope). This is a significant gap for a tool with no annotation coverage, as critical behavioral traits are missing.

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?

The description is a single, efficient sentence with zero waste—it directly states the action and constraint. It's appropriately sized and front-loaded, making it easy to parse quickly without unnecessary elaboration.

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

Completeness2/5

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

Given the complexity (1 parameter, no annotations, no output schema), the description is incomplete. It doesn't explain what 'top-level object info' returns, how to interpret results, or handle errors. For a query tool with no structured support, this leaves the agent under-informed about usage and outcomes.

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

Parameters2/5

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

The input schema has 1 parameter ('id') with 0% description coverage, and the description only mentions 'by id' without explaining what the 'id' represents (e.g., document ID, object type) or its format. This adds minimal semantic value beyond the schema, failing to compensate for the low coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'List top-level object info by id' states a purpose (list information) and resource (top-level objects) with a constraint (by id), but it's vague about what 'top-level object info' entails and doesn't distinguish it from sibling tools like 'docx-queryMeta' or 'docx-getSchema'. It avoids tautology by not restating the name/title, but lacks specificity.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites, context, or exclusions, and with siblings like 'docx-queryMeta' and 'docx-getSchema', there's no indication of how this tool differs or when it's preferred. This leaves the agent without usage direction.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/lihongjie0209/docx-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server