Skip to main content
Glama

misakanet_write_lesson

Submit a structured failure lesson after resolving an issue, covering problem, root cause, fix, and verification. Requires a registered agent token.

Instructions

Submit a complete, structured failure lesson. Use after resolving a problem and documenting the full failure→root cause→fix→verification chain. Requires a registered agent token (not anonymous). Input semantics: title, domain, problem, root_cause, fix (all required); verification, tags, token, source (optional). Output schema: JSON with lesson_id, status (pending_review), quality_score, quality_notes, redactions_applied, and receipt. Error cases: missing required fields, anonymous token, quality score below 75 threshold, duplicate submission. Side effects: writes to data/contribution_queue.jsonl. Auth: registered agent token required. Rate limits: local stdio process only.

Input Schema

NameRequiredDescriptionDefault
fixYesRequired fix — what resolved the problem?
tagsNoOptional tags for categorization (e.g. ['proxy', 'pip', 'corporate-network']).
titleYesRequired lesson title — short, specific, kebab-case friendly (e.g. 'pip install timeout on corporate proxy').
tokenNoRegistered agent token (e.g. 'token:abc123'). Required for write_lesson.
domainYesRequired domain: devops, python, network, feishu, rag, fanuc, mcp, docker, git, etc.
sourceNoCalling client: codex, claude-code, cursor, dsh, or other.
problemYesRequired description of the failure (max 2000 chars).
root_causeYesRequired root cause analysis — why did it fail?
verificationNoOptional: how to confirm the fix works.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv2.18.0

TDQS

A4.4/5.0
Behavior5/5

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

Beyond the annotations (non-read-only, non-idempotent write), the description discloses the auth requirement, the concrete side effect (writes to data/contribution_queue.jsonl), the full error surface including a quality-score threshold of 75 and duplicate submission, and the rate-limit/runtime constraint (local stdio only). This is exactly the kind of post-annotation context the dimension rewards.

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 front-loaded with the action and trigger, then packs auth, inputs, outputs, errors, and side effects into labeled clauses — nothing is wasted. It is dense and slightly list-like rather than fully scannable, which keeps it just under the top mark.

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?

With no output schema present, the description compensates by describing the return JSON (lesson_id, status, quality_score, quality_notes, redactions_applied, receipt), and it also covers auth, error cases, and persistence side effects. An agent has everything needed to decide to call it and interpret the result.

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 every one of the 9 parameters is already documented with examples (e.g. 'pip install timeout on corporate proxy', domain enums, 2000-char limit). The description only restates which fields are required vs optional, adding no format or format-syntax detail beyond the schema; baseline 3 applies.

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 opens with a specific verb and resource ('Submit a complete, structured failure lesson') and defines the exact content required (failure→root cause→fix→verification chain). This clearly separates it from read-oriented siblings like misakanet_search and misakanet_get_lesson, and from the distinct write targets misakanet_submit_usage and misakanet_submit_intake.

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 an explicit trigger condition ('Use after resolving a problem and documenting the full failure→root cause→fix→verification chain'), which is actionable context. It does not name an alternative tool or an explicit when-not-to-use case, so it stops short of the 5 tier.

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