Skip to main content
Glama

Generate execution-verified code

soma_generate_verified_code
Read-only

Generate code for a coding task and verify it by running against tests in an isolated sandbox, returning PASS/FAIL verdicts with a certificate. Provide example input/output pairs to enable verification.

Instructions

Ask Soma to write code for a task. When the task is verifiable, the returned code has been executed against derived tests in an isolated sandbox before it is returned, and a certificate (verdict + tests passed) is attached. Include concrete examples in the prompt (e.g. doctest-style '>>> f(2) == 4') to make the result verifiable rather than best-effort.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
promptYesThe coding task. Include example input/output pairs to enable verification.
max_tokensNoMaximum output tokens (default 1500).
Behavior4/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, indicating a safe, non-destructive operation. The description adds valuable behavioral context: the code is executed in an isolated sandbox, a certificate with verdict and tests passed is attached, and the verification is conditional on task verifiability. This goes beyond the annotations and provides important expectations about the output and process.

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 concise and well-structured. It front-loads the core purpose, then explains the verification process and provides actionable advice on prompt construction. Every sentence adds value, and there is no fluff or repetition. The structure is logical: what it does, how it works, and how to use it effectively.

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?

Given the tool's complexity (verification, sandbox, certificate) and the absence of an output schema, the description covers the essential aspects: what the tool does, how verification works, and how to improve results. It does not detail the certificate format or the exact conditions for verifiability, but these are not critical for an agent to invoke the tool correctly. The description is complete enough for effective use.

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 both parameters (prompt and max_tokens) are already documented in the schema. The description adds guidance on how to use the prompt parameter (include concrete examples) and mentions the default for max_tokens, but this is largely redundant with the schema. The description does not add significant new meaning beyond the schema, so a baseline 3 is appropriate.

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 the tool's purpose: 'Ask Soma to write code for a task.' It specifies the key differentiator—execution-verified code with a certificate—and distinguishes it from a best-effort generation. The verb 'write code' and resource 'task' are specific, and the mention of verification sets it apart from the sibling tool.

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 provides clear guidance on when to use this tool: when the task is verifiable, and it advises including concrete examples in the prompt to enable verification. It implies that for non-verifiable tasks, this tool may not be ideal, but it does not explicitly name the sibling tool or state when to use soma_verify_code instead. The guidance is strong but lacks an explicit exclusion or alternative mention.

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/medianemi-beep/soma-mcp'

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