Skip to main content
Glama
Axiomatic-AI

axiomatic-mcp

Official
by Axiomatic-AI

AxTidy3D_generate_code

Generate executable Python code for Tidy3D FDTD and mode-solving simulations from a natural language problem description. Fixes failed code when given the previous code and error.

Instructions

Generate Python code for a Tidy3D simulation (FDTD, mode solving) from a natural language problem description. Returns executable code and an explanation. The code must be run separately using execute_code. If a previous attempt failed, pass previous_code and previous_error so the generator can fix it instead of starting over.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
previous_codeNoThe code from a prior failed attempt, if retrying
previous_errorNoThe error message from the prior failed attempt, if retrying
problem_descriptionYesNatural language description of the simulation to build

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.1.20

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations provided, the description carries the full burden. It discloses that the code must be run separately and that retry logic is supported, which are useful non-obvious behaviors. However, it does not disclose potential side effects (e.g., does generating code consume resources?), error characteristics, or what constitutes a 'previous attempt failed' detection. The disclosure is adequate for a generation tool but not rich.

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 two sentences, front-loading the primary purpose and then adding the retry guidance. Every sentence earns its place with no fluff. It could be more structured with a clear when-to-use section, but it is efficient and well-ordered.

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 generation tool with 3 parameters all covered by schema and a clear output description (executable code and explanation), the description is complete enough for an agent to call it correctly. It doesn't mention output format details, but the output schema is absent and the description says 'returns executable code and an explanation', which suffices. The retry guidance fills a common integration gap.

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 description coverage is 100%, so the schema adequately documents each parameter. The description adds context that previous_code and previous_error are used for retry fixes, which complements the schema's 'if retrying' hint, but it doesn't add significant new meaning beyond the schema. The main parameter problem_description is well-defined in the schema. Baseline 3 is appropriate.

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 clearly states the verb 'Generate' and the resource 'Python code for a Tidy3D simulation', specifying supported simulation types (FDTD, mode solving). It distinguishes from siblings like AxTidy3D_start_simulation and AxTidy3D_execute_code by indicating this is generation only. It could explicitly name the sibling for differentiation, but the purpose is unambiguous.

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 states when to use this tool: given a natural language problem description, and when to use a variant: when retrying with previous_code and previous_error. It implies that execution is handled separately via execute_code, which guides usage flow. However, it does not explicitly state when to use AxTidy3D_generate_code vs AxMeep_generate_code or when not to use it (e.g., for execution), leaving some inference to the agent.

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

Deploy Server

Other Tools