Skip to main content
Glama

Metis · Software Engineer — Analyze Script

analyze_script

Parse R or Python scripts to extract structured metadata including packages, variables, and dependencies using regex, without executing code or accessing data.

Instructions

Parse one R or Python script and extract structured metadata.

Returns packages, file reads/writes, variable names, source dependencies,
and transform patterns — all from regex parsing (no execution, no AST,
no data access).  The script's code is read but never sent to an LLM;
only the extracted metadata is returned.

Args:
    path: Absolute path to the script file (.R, .Rmd, .qmd, or .py).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

With no annotations, the description fully carries the burden. It discloses the regex-based nature, no execution, no data access, and no LLM exposure. It does not cover error handling or side effects, but the output schema covers return values.

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 extremely concise: two short paragraphs plus an Args section. Every sentence adds value, with no redundancy or filler.

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?

For a simple one-parameter tool with an output schema, the description is complete. It explains the extraction method, limitations, and safety aspects, leaving no obvious gaps for the agent.

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?

The single parameter 'path' has 0% schema description coverage, but the description adds crucial context: 'Absolute path to the script file (.R, .Rmd, .qmd, or .py).' This specifies format and absolute path requirement, adding significant value 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 it parses R or Python scripts and extracts structured metadata. The verb 'parse' and resource 'script' are explicit, and it distinguishes itself from sibling tools by focusing on static analysis without execution.

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?

It explains that parsing is regex-based with no execution, no AST, no data access, and code is not sent to an LLM. This provides clear guidance on when to use the tool safely, though it doesn't explicitly list alternatives or when not to use it.

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/SVerITG/Metis'

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