Skip to main content
Glama
anaseqal

MCP Code Mode

by anaseqal

record_semantic_failure

Record cases where code runs successfully but fails to achieve the intended goal. Capture what went wrong and what worked to improve future approaches.

Instructions

Record a semantic failure: when code executed successfully but didn't accomplish the goal.

This is different from error-based learning. Use this when:

  • Code ran without errors but produced wrong output

  • Tool was used but didn't achieve the intended objective

  • An approach worked technically but failed semantically

Args: objective: What you were trying to accomplish failed_approach: What you tried that didn't work (even though it ran) successful_approach: What actually worked to accomplish the objective context: Why the first approach failed or additional context tags: Comma-separated tags (e.g., "api,authentication,retry")

Example: record_semantic_failure( objective="Display image in Goose app", failed_approach="Used print() to output file path", successful_approach="Returned base64 encoded image as MCP content object", context="MCP clients need structured content objects, not just paths", tags="goose,mcp,display,images" )

Returns: Confirmation message

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
objectiveYes
failed_approachYes
successful_approachYes
contextNo
tagsNo

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 bears full responsibility. It explains that the tool records semantic failures and returns a confirmation message, which is adequate for a simple recording tool. No 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 concise and well-structured, with a clear purpose statement, usage conditions, labeled parameters, and a concrete example. No extraneous information.

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?

The description covers purpose, usage guidelines, all parameters with examples, and return value. Given the tool's low complexity and presence of an output schema, it is fully complete for an agent to use correctly.

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?

The schema has no descriptions (0% coverage), but the tool description provides detailed explanations for all five parameters, including examples and defaults, fully compensating for the schema gap.

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: recording semantic failures when code runs without errors but fails to achieve the goal. It includes examples and distinguishes from error-based learning, making the purpose 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?

The description explicitly lists three scenarios for using the tool, providing clear context. It does not explicitly mention when not to use it or compare to siblings, but the guidance is sufficient for differentiation.

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/anaseqal/codemode'

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