Skip to main content
Glama

get_docstrings

Extract documentation strings from source code by file path or named symbol. Returns docstrings only, without function bodies.

Instructions

Documentation without bodies. Pass exactly one of path or symbols.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathNo
symbolsNo
max_tokensNo

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv0.1.0

TDQS

B3/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 behavioral disclosure burden. It does reveal the key output trait ('without bodies') and a strict input requirement, but it does not explain what happens if both path and symbols are provided, how max_tokens affects results, or what the return structure looks like.

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

Conciseness3/5

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

The description is short, front-loaded, and free of filler, which is good. However, the brevity crosses into under-specification: two sentence fragments cannot adequately cover three parameters, the mutual-exclusion rule, and tool-selection context.

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

Completeness2/5

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

Given three parameters, no annotations, and no output schema, the description is incomplete. It does not explain accepted path or symbol formats, mention max_tokens at all, or describe the output beyond 'documentation,' so an agent must infer too much to invoke the tool confidently.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate for missing parameter meaning. It adds the useful 'exactly one of path or symbols' constraint, but it never defines what path should point to, what symbols should contain, or what max_tokens controls. This leaves significant semantic ambiguity for three parameters.

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 phrase 'Documentation without bodies' combined with the tool name get_docstrings identifies a specific resource (docstrings) and a distinctive scope (no function bodies), which helps distinguish it from sibling tools like get_symbol or file_outline. It stops short of an explicit imperative statement such as 'Returns docstrings for a path or symbols,' so clarity is good but not maximal.

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?

The instruction 'Pass exactly one of path or symbols' is a clear invocation rule and implies the tool is for retrieving documentation rather than symbol bodies. However, the description never names alternative tools or states explicit when-to-use versus when-not-to-use conditions, leaving sibling differentiation mostly implicit.

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

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/matthew-brough/AST_MCP'

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