Skip to main content
Glama
ajwann

installed-api

py_inspect

Inspect a Python object in the project’s installed interpreter to get its signature, docstring, members, source location, and distribution version for exact API verification.

Instructions

Inspect a Python object as installed in the project's own interpreter: signature, docstring, members (for modules/classes), defining file:line and the installed distribution version. target is a dotted path such as 'requests.Session.request' or 'pandas.DataFrame.merge'.

Input Schema

NameRequiredDescriptionDefault
targetYes
max_membersNo
project_dirNo
include_projectNoalso import from the project's ./src and ./

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/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 burden. It usefully discloses that inspection happens in the project's live interpreter and reports the defining file:line and installed distribution version, but it says nothing about import side effects, failure behavior for unresolvable targets, or the effect of max_members truncation on results.

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?

Two tight sentences, zero filler, with the scope constraint and return contents front-loaded and the parameter format example trailing as supporting detail.

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?

No output schema exists, and the description does the required work by enumerating the returned fields (signature, docstring, members, file:line, distribution version). It falls short only on error/truncation behavior for a 4-parameter introspection tool.

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?

Schema description coverage is only 25% (only include_project is documented), so the description must compensate. It does add real value for `target` by giving dotted-path examples like 'requests.Session.request' and 'pandas.DataFrame.merge', but `max_members` (default 80, truncation semantics) and `project_dir` are left undocumented in both places.

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?

Specific verb (inspect) plus a precise scope: 'a Python object as installed in the project's own interpreter', with an explicit enumeration of what is retrieved (signature, docstring, members, file:line, distribution version). That enumeration implicitly separates it from py_source (source bodies) and py_versions (version listing), but no sibling is named explicitly.

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 phrase 'as installed in the project's own interpreter' implies when to use it (runtime introspection of the actually-installed package rather than other environments or source files), but the description never states when not to use it or names py_source/py_versions as the alternative for source-reading or version-listing tasks.

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