Skip to main content
Glama
bailian-tools-mcp
by niradler

Code interpreter (Model Studio sandbox)

code_interpreter

Runs Python in a sandbox to handle calculations, data analysis, file parsing, and charting from a task description, returning the answer plus executed code and output.

Instructions

Run Python in Model Studio's sandbox for calculations, data analysis, file parsing and charting. Send the task, not necessarily the code; returns the answer plus the executed code and output. Billed to your Model Studio plan (~$10/1k web searches in Singapore) — ask before bulk use.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "task": "<task>"
    },
    "name": "code_interpreter"
  }
}

Input Schema

NameRequiredDescriptionDefault
taskYesThe computation or analysis to perform, including any inline data.
max_output_tokensNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations, the description still discloses the return shape (answer plus executed code and output) and the billing model, which are the two things an agent most needs before invoking a metered sandbox. It omits execution limits, timeout behavior, and whether state/files persist across calls, so it is not fully transparent. The pricing is also quoted in "web searches", a unit that doesn't obviously belong to a Python sandbox and may mislead.

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?

Three tight sentences, capability list first, then return behavior, then cost caveat — good front-loading with no filler. The billing sentence is the weak link: the "$10/1k web searches" figure is confusing in a code-execution context and slightly muddies an otherwise clean statement.

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?

For a two-parameter tool with no output schema, the description covers what it does, what comes back, how to phrase input, and the cost caveat. Remaining gaps — execution time limits and sandbox isolation/state — are modest but real for a sandboxed runtime.

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 coverage is 50%: `task` is documented, `max_output_tokens` is not. The description usefully clarifies that `task` should carry the objective and inline data and may omit code, but it says nothing about output-token capping or defaults, leaving the undocumented parameter unaddressed.

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?

States a concrete verb and environment ("Run Python in Model Studio's sandbox") and enumerates the capability set: calculations, data analysis, file parsing, charting. That is enough for an agent to separate it from the search/extract siblings without opening the schema.

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?

Gives real usage guidance — "Send the task, not necessarily the code" tells the agent how to phrase the call, and "ask before bulk use" sets a cost precondition. It lacks explicit when-not-to-use framing, but the sibling set is all search tools, so the boundary is inherently clear.

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