Skip to main content
Glama

chunk_code

Parse code files into semantic chunks like functions and classes to improve RAG retrieval accuracy for code analysis and documentation.

Instructions

Parse code file into semantic chunks (functions, classes, methods) for better RAG retrieval.

Args: file_path: Path to code file to chunk

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_pathYes

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 carries the full burden of behavioral disclosure. It states the tool parses code into semantic chunks but doesn't describe behavioral traits such as error handling (e.g., what happens with invalid file paths), performance characteristics, or output format details. The mention of 'RAG retrieval' hints at a use case but lacks operational specifics.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately sized and front-loaded: the first sentence states the core purpose, and the second provides parameter details. There's no wasted text, but the structure could be slightly improved by integrating the parameter explanation more seamlessly rather than as a separate 'Args:' section.

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?

Given the tool's moderate complexity (parsing code), no annotations, and an output schema present, the description is minimally adequate. It covers the basic purpose and parameter but lacks details on behavior, error cases, or output structure. The output schema likely handles return values, but the description doesn't mention this, leaving gaps in overall context.

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 description adds meaningful context for the single parameter: 'file_path: Path to code file to chunk.' This clarifies the parameter's purpose beyond the schema's basic type (string). With 0% schema description coverage and only one parameter, the description effectively compensates by providing clear semantics, though it could include format examples (e.g., relative vs. absolute paths).

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 purpose: 'Parse code file into semantic chunks (functions, classes, methods) for better RAG retrieval.' This specifies the verb (parse), resource (code file), and outcome (semantic chunks for RAG retrieval). However, it doesn't explicitly differentiate from sibling tools like 'semantic_search' or 'search_knowledge', which might have overlapping retrieval purposes.

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?

The description provides no guidance on when to use this tool versus alternatives. It mentions 'for better RAG retrieval' but doesn't specify contexts, prerequisites, or exclusions. Sibling tools like 'semantic_search' or 'search_knowledge' might be related, but there's no explicit comparison or usage rules provided.

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/MidOSresearch/mid-os-research-protocol'

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