Skip to main content
Glama

retrieve_lessons

Read-only

Retrieve relevant lessons for a tool action context to inform decision-making in PreToolUse hooks.

Instructions

Retrieve the most relevant lessons for a given tool/action context. Use in PreToolUse hooks for per-action guidance.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
toolNameYesThe tool being called (e.g., Bash, Edit, Read)
actionContextNoDescription of what the tool call is doing
maxResultsNoMax lessons to return (default 5)
Behavior3/5

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

The annotation already indicates readOnlyHint: true, and the description 'Retrieve' is consistent. No contradictions. However, the phrase 'most relevant' suggests a ranking algorithm that is not explained. With annotations present, the description adds only marginal behavioral context beyond what's already declared.

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 extremely concise, consisting of two short sentences that immediately convey the purpose and usage context. 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?

Given the tool has 3 parameters and no output schema, the description is minimally adequate. It explains the purpose and usage hook but does not describe the return format or behavior (e.g., ranking logic). An agent would need additional information to fully understand what lessons are retrieved.

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 input schema has 100% coverage for parameter descriptions. The description does not add any additional meaning beyond the schema, so a 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 'Retrieve the most relevant lessons for a given tool/action context', specifying the verb and resource. It hints at a specific use case but doesn't explicitly differentiate from the sibling 'search_lessons', which might serve a similar 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?

It explicitly states 'Use in PreToolUse hooks for per-action guidance.', providing clear context for when to use the tool. However, it doesn't mention when not to use it or mention alternatives like 'search_lessons'.

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/IgorGanapolsky/ThumbGate'

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