Skip to main content
Glama

describe_logic

Analyze function or class behavior by extracting raw code, identifying similar logic patterns, and determining structural importance within code dependencies.

Instructions

Describe the behavioral logic of a function or class — returns the raw function body, logic cluster membership (which other entities behave similarly), and structural centrality (PageRank importance in the dependency graph). Use when asked 'what does this function do internally', 'how does X work at a high level', or 'what is the logic of X'.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesFunction or class name
Behavior3/5

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

With no annotations provided, the description carries full burden. It discloses what information is returned (function body, logic cluster membership, centrality metrics) but doesn't mention limitations like whether it works on all functions/classes, error conditions, performance characteristics, or authentication requirements. It provides basic behavioral context but lacks depth for a tool analyzing code logic.

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 perfectly front-loaded with the core purpose in the first sentence, followed by specific usage examples. Every sentence earns its place by providing essential guidance without redundancy. The structure moves from general to specific efficiently.

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 1 parameter with full schema coverage and no output schema, the description provides good context about what the tool returns and when to use it. However, for a logic analysis tool with no annotations, it could better address limitations or edge cases (e.g., what happens with undefined names, complexity limits). The usage examples compensate well for the lack of output schema.

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?

With 100% schema description coverage (the single parameter 'name' is well-documented in the schema), the baseline is 3. The description adds value by clarifying this is for 'function or class name' and tying it to the tool's purpose of analyzing behavioral logic, providing context beyond the schema's technical specification.

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 ('describe behavioral logic', 'returns raw function body, logic cluster membership, structural centrality') and distinguishes it from siblings by focusing on internal logic analysis rather than naming, mapping, or listing functions. It explicitly answers 'what does this function do internally' questions.

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 usage guidance with three concrete examples of when to use this tool ('when asked what does this function do internally', 'how does X work at a high level', 'what is the logic of X'). This clearly differentiates it from siblings like describe_symbol (likely external description) or find_similar_logic (comparative analysis).

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/EtienneChollet/ontomics'

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