Skip to main content
Glama
npow

metaflow-mcp-server

by npow

get_source_code

Retrieve the exact source code used in a Metaflow run. Get the main flow file or a specific file from the code package by providing the run pathspec.

Instructions

Get the source code from a Metaflow run's code package.

Every Metaflow run that executes remotely stores a snapshot of the code. Use this to inspect the exact code that was used in a run.

Without file_path, returns the main FlowSpec source file and lists all files in the code package. With file_path, returns the content of that specific file from the package.

Args: pathspec: Run pathspec like "FlowName/RunID", or task pathspec like "FlowName/RunID/StepName/TaskID". file_path: Optional path of a specific file within the code package. If omitted, returns the main flow file and a listing of all files in the package.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathspecYes
file_pathNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

No annotations are provided, so the description carries full responsibility. It discloses that the tool returns the main FlowSpec file and file listing without file_path, and the specific file content with file_path. It implies a read-only operation, with no behavioral contradictions.

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 well-structured with a brief introduction, behavioral details, and an Args section. Every sentence adds value without unnecessary repetition. It is concise yet complete.

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's complexity (two parameters, conditional behavior) and the presence of an output schema, the description provides sufficient context. It covers the main scenarios and parameter usage, making it complete for agent invocation.

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 must explain parameter meaning. It does so thoroughly: pathspec is described as a Run or task pathspec with examples, and file_path is explained as optional, with the default behavior of returning the main flow file and listing.

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 'Get the source code from a Metaflow run's code package,' with a specific verb and resource. It distinguishes itself by explaining the two modes of operation (with and without file_path) and lists sibling tools that serve different functions.

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 explains when to use the tool: 'to inspect the exact code that was used in a run.' It provides context about remote runs storing a snapshot. While it does not explicitly list alternatives or when not to use it, the purpose is clear and distinct from sibling tools.

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/npow/metaflow-mcp-server'

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