Skip to main content
Glama
contextstream

ContextStream MCP Server

Capture a lesson learned

session_capture_lesson

Record mistakes or corrections as structured lessons to prevent future errors. Surface past lessons when similar situations arise, improving accuracy over time.

Instructions

Capture a lesson learned from a mistake or correction. Use this when the user corrects you, expresses frustration, or points out an error. These lessons are surfaced in future sessions to prevent repeating the same mistakes.

Example triggers:

  • User says "No, you should..." or "That's wrong"

  • User expresses frustration (caps, "COME ON", "WTF")

  • Code breaks due to a preventable mistake

The lesson will be tagged with 'lesson' and stored with structured metadata for easy retrieval.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
titleYesLesson title - what to remember (e.g., "Always verify assets in git before pushing")
impactYesWhat went wrong (e.g., "Production 404 errors - broken landing page")
triggerYesWhat action caused the problem (e.g., "Pushed code referencing images without committing them")
categoryYesCategory of the lesson
keywordsNoKeywords for matching in future contexts (e.g., ["git", "images", "assets", "push"])
severityNoSeverity: critical for production issues, high for breaking changes, medium for workflow, low for minormedium
preventionYesHow to prevent in future (e.g., "Run git status to check untracked files before pushing")
project_idNoProject ID (UUID).
workspace_idNoWorkspace ID (UUID).
Behavior3/5

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

Annotations indicate readOnlyHint=false and destructiveHint=false, so the description correctly implies a write operation. It adds that the lesson is tagged 'lesson' and stored for future retrieval, which is helpful. However, it does not disclose permission requirements or confirm idempotency.

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 concise and well-structured with bullet points. It front-loads the purpose, followed by usage guidance and examples, with no extraneous information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple capture tool, the description covers purpose, triggers, and storage behavior. However, it lacks output specification (no output schema) and does not mention what the tool returns, leaving some gaps in completeness.

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?

The schema covers all parameters with descriptions (100% coverage). The description does not add additional meaning beyond the schema; thus baseline score of 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 that the tool captures a lesson from a mistake or correction, with specific trigger examples. However, it does not explicitly differentiate from sibling tools like session_capture or session_remember, which may have overlapping purpose.

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 (user corrections, frustration, errors) but does not mention when not to use it or suggest alternative tools among siblings.

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/contextstream/mcp-server'

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