Skip to main content
Glama

py_run

Execute analysis scripts against inbox files inside an offline sandbox, returning only small JSON results so raw personal data stays local.

Instructions

analysis/ 配下のスクリプトを、ネットワーク無しのコンテナで inbox ファイルに対して実行し、小さな JSON 結果だけ返す。

スクリプト内では `import sd` して `df = sd.load("<file id>")` で読み、`sd.result({...})` で結果を返す。
print 出力は返らない。結果に保護対象の値(PII 列の値)が含まれると拒否される。

Args:
    script: analysis ディレクトリからの相対パス(例: retention.py)。
    inputs: files_describe で得た id のリスト。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
inputsNo
scriptYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does a lot: network-disabled execution, print output discarded, only a small JSON result returned, and hard rejection when PII column values appear in the result. It omits execution limits (timeouts/quotas) and whether the run is side-effect-free with respect to the input files, but the safety-relevant traits are unusually well disclosed.

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?

Purpose is front-loaded in the first line, followed by the script contract (sd.load / sd.result), then the two arguments. Dense but well-ordered; the inline code examples earn their space by defining the required calling convention.

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?

An output schema exists, so return values need no further explanation, and the description still clarifies that only sd.result payloads survive and that print output is dropped. For a sandboxed code-execution tool the main residual gaps are error/failure modes and any timeout behavior.

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?

Schema description coverage is 0%, so the description must compensate, and it does for both parameters: script is a path relative to the analysis directory (with an example), and inputs is a list of ids produced by files_describe. Both semantics are supplied even though the schema itself documents neither.

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?

The description states a specific verb and resource: it runs scripts from analysis/ against inbox files inside a network-disabled container and returns a small JSON result. It is clearly separable from sql_run and files_describe by the 'execute a Python script' framing, though it never names the sibling it is not.

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?

It implicitly shows the workflow (obtain ids via files_describe, then pass them as inputs) and that scripts must live under analysis/, which is useful context. However it gives no explicit when-to-use/when-not guidance and never contrasts itself with sql_run, so an agent must infer the boundary between running SQL and running a Python script.

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