Skip to main content
Glama

get_file_docs

Retrieve coding patterns and conventions for specific files before modification to ensure adherence to project-specific rules and architectural decisions.

Instructions

Get file-specific coding patterns and conventions for ANY file you work with. Call BEFORE modifying code AND when you encounter a new file during implementation. Returns contextual guidelines, performance considerations, and architectural decisions for specific files or directories. Each file/directory may have unique rules that override general patterns. Use whenever: editing existing files, creating files in a new directory, implementing features that touch multiple files, or debugging file-specific issues.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filePathYesFile path or pattern. Examples: "src/components/Button.tsx", "**/*.test.js", "services/auth/*"
Behavior3/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It explains that the tool returns contextual guidelines, performance considerations, and architectural decisions, and notes that file-specific rules may override general patterns. However, it lacks details on potential limitations, error handling, or response format, leaving some behavioral aspects unclear.

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 well-structured and front-loaded with the core purpose, followed by usage instructions and scenarios. Every sentence adds actionable information without redundancy, making it efficient and easy to parse for an AI agent.

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?

Given the tool's moderate complexity (1 parameter, no output schema, no annotations), the description is largely complete, covering purpose, usage, and behavioral context. However, it could be enhanced by specifying the return format or example outputs, which would help the agent understand what to expect from the tool's execution.

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 100% description coverage, so the baseline is 3. The description adds value by emphasizing that the tool works for 'ANY file' and 'specific files or directories,' reinforcing the parameter's purpose beyond the schema's technical details, though it doesn't provide additional syntax or format insights.

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?

The description clearly states the tool's purpose with specific verbs ('Get file-specific coding patterns and conventions') and resources ('for ANY file you work with'), distinguishing it from siblings like get_global_rules or check_project_rules by focusing on file-specific rather than general or project-wide guidelines.

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

Usage Guidelines5/5

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

The description provides explicit guidance on when to use the tool ('Call BEFORE modifying code AND when you encounter a new file during implementation') and lists specific scenarios ('editing existing files, creating files in a new directory, implementing features that touch multiple files, or debugging file-specific issues'), clearly differentiating it from alternatives without being misleading.

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/afterxleep/doc-bot'

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