Skip to main content
Glama

docx-editMeta

Update metadata fields in Word documents including title, author, keywords, and timestamps to organize and document file information.

Instructions

Patch metadata of a docx by id.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYes
patchYes

Implementation Reference

  • Core handler function that applies the metadata patch by merging it into the document's JSON meta object and triggering a document rebuild via updateJson.
    editMeta(id: DocId, patch: Partial<DocxJSON["meta"]>) {
      return this.updateJson(id, (json) => ({
        ...json,
        meta: { ...(json.meta ?? {}), ...(patch ?? {}) }
      }));
    }
  • Top-level switch case handler for the tool call: validates arguments using the tool's inputSchema and calls the DocRegistry.editMeta method.
    case "docx-editMeta": {
      const { id, patch } = parseArgs<{ id: string; patch: any }>(args, tools["docx-editMeta"].inputSchema);
      const res = registry.editMeta(id, patch);
      return ok({ id: res.id, updatedAt: res.updatedAt, meta: res.json.meta });
    }
  • src/index.ts:57-60 (registration)
    Tool registration in the tools object, including description and inputSchema that references the meta schema from DocxSchema.
    "docx-editMeta": {
      description: "Patch metadata of a docx by id.",
      inputSchema: { type: "object", required: ["id", "patch"], properties: { id: { type: "string" }, patch: DocxSchema.properties.meta } }
    },
  • JSON Schema definition for the document metadata object, which is referenced by the tool's inputSchema for the 'patch' parameter.
    meta: {
      type: "object",
      additionalProperties: false,
      properties: {
        title: { type: "string" },
        subject: { type: "string" },
        creator: { type: "string" },
        description: { type: "string" },
        keywords: { type: "string" },
        lastModifiedBy: { type: "string" },
        category: { type: "string" },
        company: { type: "string" },
        manager: { type: "string" },
        revision: { type: "string" },
        createdAt: { type: "string", format: "date-time" },
        modifiedAt: { type: "string", format: "date-time" }
      }
    },
Behavior2/5

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

With no annotations provided, the description carries full burden but offers minimal behavioral insight. 'Patch' implies a write/mutation operation, but it doesn't disclose permissions needed, whether changes are reversible, rate limits, or what happens to unspecified metadata fields. This is inadequate for a mutation tool with zero annotation coverage.

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 extremely concise with a single sentence that directly states the tool's function. It's front-loaded and wastes no words, making it efficient for quick understanding.

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?

For a mutation tool with 2 parameters (including a nested object), 0% schema description coverage, no annotations, and no output schema, the description is insufficient. It doesn't explain the patch structure, return values, error conditions, or behavioral aspects, leaving the agent with critical gaps in understanding.

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 0%, but the description mentions 'metadata' and 'patch', which hints at the parameters' roles. However, it doesn't detail what fields can be patched (e.g., title, creator) or their formats, leaving significant gaps. The description adds some meaning but doesn't fully compensate for the lack of schema descriptions.

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?

The description clearly states the action ('Patch') and target ('metadata of a docx by id'), making the purpose understandable. It distinguishes from siblings like docx-editContent (which edits content) and docx-queryMeta (which queries metadata), but doesn't explicitly mention these distinctions in the description itself.

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?

No guidance is provided on when to use this tool versus alternatives. The description doesn't mention prerequisites, when-not-to-use scenarios, or compare it to siblings like docx-queryMeta or docx-editContent, leaving the agent without contextual usage instructions.

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