Skip to main content
Glama

get_file_status

Read-only

Check DOCX or Google Docs file metadata including edit history, normalization statistics, and cache information to monitor document changes and processing status.

Instructions

Get file/session metadata including edit count, normalization stats, and cache info. Supports DOCX and Google Docs.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_pathNoPath to the DOCX file.
google_doc_idNoGoogle Doc ID or URL (alternative to file_path). Extract from URL: docs.google.com/document/d/{ID}/edit

Implementation Reference

  • Main implementation of the 'get_file_status' tool handler for docx-mcp.
    export async function getFileStatus(
      manager: SessionManager,
      params: { file_path?: string },
    ): Promise<ToolResponse> {
      try {
        const resolved = await resolveSessionForTool(manager, params, { toolName: 'get_file_status' });
        if (!resolved.ok) return resolved.response;
        const { session, metadata } = resolved;
        return ok(mergeSessionResolutionMetadata({
          file_path: manager.normalizePath(session.originalPath),
          created_at: session.createdAt.toISOString(),
          expires_at: session.expiresAt.toISOString(),
          last_activity: session.lastAccessedAt.toISOString(),
          edit_count: session.editCount,
          edit_revision: session.editRevision,
          cached_save_artifacts: session.saveCache.size,
          save_defaults: {
            default_variants: ['clean', 'redline'],
            default_save_format: 'both',
            supports_variant_override: true,
          },
          document: { filename: session.filename },
          normalization: session.normalizationStats
            ? {
                runs_merged: session.normalizationStats.runsMerged,
                proof_errors_removed: session.normalizationStats.proofErrRemoved,
                redlines_simplified: session.normalizationStats.wrappersConsolidated,
                double_elevations_fixed: session.normalizationStats.doubleElevationsFixed,
                normalization_skipped: false,
              }
            : { runs_merged: 0, redlines_simplified: 0, double_elevations_fixed: 0, normalization_skipped: true },
        }, metadata));
      } catch (e: unknown) {
        const msg = errorMessage(e);
        return err('STATUS_ERROR', msg);
      }
    }
  • Alternative implementation of the 'get_file_status' tool handler specifically for GDocs sessions.
    export async function gdocsGetFileStatus(
      _manager: SessionManager,
      session: GDocsSession,
      _params: Record<string, unknown>,
      metadata: Record<string, unknown>,
    ): Promise<ToolResponse> {
      try {
        return ok({
          google_doc_id: session.docId,
          provider: 'gdocs',
          created_at: session.createdAt.toISOString(),
          expires_at: session.expiresAt.toISOString(),
          last_activity: session.lastAccessedAt.toISOString(),
          edit_count: session.editCount,
          edit_revision: session.editRevision,
          revision_id: session.doc.getRevisionId(),
          is_revision_fresh: session.doc.isRevisionFresh(),
          tabs: session.doc.getTabs(),
          ...metadata,
        });
      } catch (e: unknown) {
        return err('STATUS_ERROR', e instanceof Error ? e.message : String(e));
      }
    }
Behavior4/5

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

Annotations declare readOnlyHint=true, so description appropriately focuses on adding specific return value details (edit count, normalization stats, cache info) rather than safety. Adds format support context not in annotations. No contradictions.

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 with zero waste: first defines the metadata categories retrieved, second declares supported formats. Front-loaded with essential information, no filler.

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?

Compensates well for missing output schema by listing specific metadata fields returned. Covers supported formats. Minor gap: does not clarify that exactly one of the two optional parameters must be provided (mutual exclusivity), though this is partially inferable.

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 has 100% description coverage with clear type definitions. Description maps 'DOCX' and 'Google Docs' to the respective parameters implicitly but adds no semantic detail beyond what the schema already provides. Baseline 3 appropriate given high schema 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?

Specific verb (Get) + resource (file/session metadata) with concrete examples (edit count, normalization stats, cache info). Explicitly scopes to DOCX and Google Docs, clearly distinguishing from sibling read_file which implies content retrieval rather than metadata.

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?

Implies usage through 'metadata' keyword distinguishing it from content-reading tools like read_file, but lacks explicit when-to-use guidance or contrast with alternatives. No mention of prerequisites like file open status.

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/UseJunior/safe-docx'

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