Skip to main content
Glama
ayhammouda

python-docs-mcp-server

compare_versions

Read-onlyIdempotent

Identify changes to a Python standard library symbol between two versions, showing added, removed, changed, or unchanged status with details like deprecation and signature differences.

Instructions

Diff a Python stdlib symbol between two indexed versions. Returns change=added|removed|changed|unchanged with optional new_in, changed_in, deprecated_in, signature_delta (advisory), see_also_added/removed, section_diff, and note fields. Both versions must be indexed; otherwise an actionable error names the available versions.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
symbolYesQualified Python symbol name, e.g. 'asyncio.TaskGroup'
v1YesPython version string, e.g. '3.11'
v2YesPython version string, e.g. '3.11'

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
symbolYesQualified symbol name being compared
v1YesSource Python version
v2YesTarget Python version
changeYesDiff discriminator: 'added' (symbol new in v2), 'removed' (symbol absent in v2), 'changed' (symbol present in both with a detected delta), or 'unchanged' (symbol present in both, no delta)
new_inNoVersion string extracted from the v2 section text; populated when change == 'added', and may also be set when change == 'changed' if the v2 section carries a versionadded marker for a sub-feature
removed_inNoVersion where the symbol is first absent; populated when change == 'removed' (equals v2)
changed_inNoVersion extracted from the v2 section; populated when change == 'changed'
deprecated_inNoVersion extracted from a deprecation marker in the v2 section
signature_deltaNoBest-effort heuristic: first non-empty diff line between v1 and v2 section text. MAY be a docstring change or prose change rather than a true signature change — treat as advisory, not authoritative.
see_also_addedNoSee-also link labels present in v2 but not v1
see_also_removedNoSee-also link labels present in v1 but not v2
section_diffNoShort unified-diff snippet (difflib.unified_diff), truncated to honor the token budget; populated only when change == 'changed' and the diff is non-trivially short
noteNoOptional advisory note about result completeness, e.g. when docs pages could not be fetched for one or both versions and the diff is therefore based on symbol presence alone.
Behavior5/5

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

The description goes beyond annotations by detailing the return structure (change type, optional fields) and error behavior for unindexed versions. This adds significant transparency for an AI agent, and there is no contradiction with annotations.

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 with two sentences. The first sentence immediately states the core purpose and output, and the second adds essential error handling info. Every sentence adds value with no wasted words.

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

Completeness5/5

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

Given the tool has an output schema and clear annotations, the description covers key aspects: core function, return fields, and error handling. It is complete for an AI agent to understand when and how to use the tool correctly.

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

Parameters3/5

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

The input schema already provides clear descriptions for all three parameters (100% coverage). The description adds minimal extra context beyond stating the condition that versions must be indexed, which is a minor enhancement. Baseline score of 3 is appropriate.

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 diffs a Python stdlib symbol between two indexed versions, using a specific verb and resource. It distinguishes itself from siblings (e.g., list_versions, detect_python_version) by focusing on comparing a single symbol across versions.

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 includes a condition that both versions must be indexed and mentions actionable error messages, which implies proper usage context. However, it does not explicitly state when to use this tool over alternatives or provide negative examples.

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/ayhammouda/python-docs-mcp-server'

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