Skip to main content
Glama

analyze_file

Analyzes local or remote PDF and document files with GLM-4.6V-Flash, converting local paths to data URLs and accepting custom prompts.

Instructions

用 GLM-4.6V-Flash 分析文件(PDF/文档等,本地路径会自动转成 data URL)。

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "source": "<source>"
    },
    "name": "analyze_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
promptNo可选:自定义提问
sourceYes文件路径或 http(s) URL

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations, the description carries the full burden, and it does disclose two real behaviors: the backing model (GLM-4.6V-Flash) and the automatic conversion of local paths into data URLs, which implies the file is read and base64-encoded. It omits other important traits such as size limits, failure modes for unsupported documents, and what the analysis returns.

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?

A single front-loaded sentence with the tool's action, model, and the parenthetical caveat placed where it is most useful. Nothing is redundant or padded.

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

Completeness3/5

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

For a two-parameter analysis tool with no output schema, the definition is minimally adequate but leaves the agent unsure about the return shape (plain text vs structured analysis) and about document constraints. The path-to-data-URL note is the most valuable completeness contribution.

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 would be 3, but the description adds genuine semantics for `source`: local paths are auto-converted to data URLs, which tells the agent it can pass either a path or a URL without pre-encoding. The `prompt` parameter is left entirely to its schema description.

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 names a specific verb+resource (分析文件) and scopes the file types to PDF/documents, which distinguishes it reasonably well from the image/video siblings. It stops short of explicitly contrasting itself with analyze_image or ocr_image, so an agent must still infer the boundary.

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?

Usage is only implied through the parenthetical file-type hint ('PDF/文档等'). There is no stated condition for choosing this over ocr_image or analyze_image, and no prerequisites such as file size, supported formats, or access requirements are mentioned.

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