Skip to main content
Glama
robertcprice

GLM-4.7 MCP Server

by robertcprice

glm_document

Add or update documentation for a file: generate docstrings, READMEs, or API docs in Google, Sphinx, NumPy, or Javadoc style using GLM.

Instructions

Add or update documentation for a file using GLM.

Use for: adding docstrings, generating README, documenting APIs.

Args: file_path: Path to file to document style: "google", "sphinx", "numpy", "javadoc" working_directory: Project directory model: "haiku" or "sonnet"

Returns: File with added documentation

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modelNohaiku
styleNogoogle
file_pathYes
working_directoryNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior2/5

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

No annotations are provided, so the description must disclose side effects and safety. It states 'Add or update' implying mutation of the target file, but does not clarify whether existing documentation is overwritten, whether the operation is reversible, or what permissions are needed. It also fails to specify whether the file is modified in-place or a new file is returned.

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 concise and well-structured with a one-line summary, a 'Use for' list, an Args section, and a Returns line. Each element adds value, and there is no redundant wording. It is suitable for quick scanning by an agent.

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?

The tool has an output schema, so return values are covered there, but the description's 'Returns: File with added documentation' is vague. Given that this is a file-modifying tool, the description is missing important context about overwrite behavior, backup, or side effects. However, the core purpose and parameters are sufficiently described for a basic understanding.

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?

The input schema has no parameter descriptions (0% coverage), so the description's Args section is the only source of semantics. It provides concise definitions for all four parameters, including allowed values for style and model, which goes beyond the schema. It could be richer (e.g., explaining style differences), but it adequately compensates for the schema gap.

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 tool's function with the verb phrase 'Add or update documentation' and specifies target resources (file, docstrings, README, APIs). It is distinguishable from siblings like glm_generate_readme in scope, though not explicitly contrasted.

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

Usage Guidelines4/5

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

The description provides explicit usage scenarios ('Use for: adding docstrings, generating README, documenting APIs'), which helps the agent decide when to select this tool. However, it does not mention alternative tools (e.g., glm_generate_readme for README-only) or exclusion criteria, so it only partially fulfills the guidance requirement.

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/robertcprice/glm-mcp-server'

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