Skip to main content
Glama
alanzha2

observe-instrument-mcp

by alanzha2

instrument_agent

Adds ioa-observe-sdk instrumentation to Python AI agent files, inserting Observe.init(), SDK imports, and decorators for LlamaIndex, LangGraph, CrewAI, and OpenAI SDK agents, while backing up the original file.

Instructions

Read a Python AI agent file, add ioa-observe-sdk instrumentation, and write it back.

Adds Observe.init(), SDK imports, @tool/@agent/@graph/@workflow decorators, and session_start() — covering LlamaIndex, LangGraph, CrewAI, and raw OpenAI SDK agents. Creates a .bak backup before modifying the file.

Args: file_path: Path to the Python file to instrument. app_name: Optional app name for Observe.init(). Inferred from file if omitted.

Returns: Summary of all changes made, the diff, and next steps.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_pathYes
app_nameNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

Annotations indicate non-read-only, non-destructive, non-idempotent, non-open-world. The description adds behavioral details: creating a .bak backup, modifying the file by adding imports and decorators, and returning a summary. 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.

Conciseness4/5

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

The description is well-structured with a main purpose sentence, followed by details and an Args section. It is concise (6 sentences) but front-loads key information appropriately.

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 the output schema exists and the description covers the return (summary, diff, next steps) and backup behavior, it is largely complete. Minor gaps like error handling or file existence prerequisites are absent but not critical.

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

Parameters5/5

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

Schema description coverage is 0%, so the description fully compensates. It explains 'file_path' as the path to the Python file and 'app_name' as an optional app name for Observe.init() inferred from the file if omitted, adding meaning beyond the schema.

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 action: reading a Python AI agent file, adding instrumentation, and writing it back. It specifies the resource (Python AI agent file) and lists supported frameworks (LlamaIndex, LangGraph, CrewAI, raw OpenAI SDK), distinguishing it from the sibling tool 'check_instrumentation'.

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 description does not provide explicit guidance on when to use this tool versus alternatives like 'check_instrumentation'. It implies usage for instrumenting a file but lacks when-not-to-use conditions or prerequisites.

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/alanzha2/observe-instrument-mcp'

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