Skip to main content
Glama

retrieve_context

Retrieve findings and return them in a sanitized format safe for LLM context. Use to inject relevant context into reasoning or knowledge base analysis without injection risks.

Instructions

Retrieve findings and return them in a sanitized format safe for LLM context.

AUTOMATIC TRIGGERS - Call this when:

  • You need to inject findings into your context for reasoning

  • Building a knowledge base context for analysis

  • You want findings formatted safely without injection risks

DIFFERENCE from retrieve_findings: This returns a sanitized context block optimized for safe inclusion in LLM prompts. Use retrieve for raw data.

ERROR RECOVERY: If this returns no results, try search_findings for keyword-based search instead - the semantic query may not match any findings.

PARAMETERS:

  • query: Search query (required)

  • project: Filter by project (optional)

  • tags: Filter by tags (optional)

  • confidence_min: Minimum confidence (optional)

  • final_k: Number of results (optional, default: 10)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tagsNo
queryYes
final_kNo
projectNo
confidence_minNo
Behavior4/5

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

No annotations are provided, so the description carries the full behavioral disclosure burden. It clearly discloses the sanitization behavior and injection-risk avoidance, which is the most important behavioral trait. It does not explicitly state read-only/no-side-effects status or output shape, but 'Retrieve' and the sanitization context cover the primary behavior.

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 core purpose and then organized into clearly labeled sections for triggers, distinction, error recovery, and parameters. It is scannable and mostly free of fluff, though the trigger bullet list is slightly redundant and 'Use retrieve for raw data' could be worded more precisely.

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?

For a 5-parameter tool with no output schema or annotations, the description provides usage triggers, sibling differentiation, a no-results fallback, and parameter semantics. It could add more detail about the return block format and whether tags are comma-separated or repeated, but the essential call-time guidance is present.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. The PARAMETERS section names all five parameters and adds meaningful details: query is required, project/tags/confidence_min are filters, and final_k has a default of 10. It stops short of describing types or formats for tags and confidence_min, so it is not a 5.

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?

States a specific verb and resource: 'Retrieve findings and return them in a sanitized format safe for LLM context.' It also explicitly differentiates from retrieve_findings by contrasting 'sanitized context block' with raw data. An agent can understand what this tool does and how it differs from its closest sibling.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides an explicit 'AUTOMATIC TRIGGERS' list with concrete scenarios. It also distinguishes this tool from retrieve_findings and gives a fallback instruction to use search_findings when no results are returned. The only minor ambiguity is 'Use retrieve for raw data,' but context makes clear this refers to retrieve_findings.

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/Vedant9500/OpenLMlib'

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