Skip to main content
Glama

cos_search

Search past observations and learned patterns ranked by confidence and impact to find relevant experience during the Orient step.

Instructions

Search observations and learned patterns with 5-signal ranking.

Use during Orient step to find relevant past experience. Read-only over memory rows (writes retrieval telemetry only; reinforcement happens on cos_details, not here — TASK-109).

Stage-1 metadata pre-filter:

  • min_confidence drops decayed/low-trust patterns BEFORE ranking. Stale low-signal patterns can otherwise crowd out fresh hits. Default 0.3 skips decayed/unvalidated noise (fresh patterns start at 0.5, so they still pass); pass 0.0 to include everything.

  • since_days caps row age. 0 = no cap (default) — age is opt-in so a valuable old decision is never silently hidden from default recall.

Args: query: Search text (e.g. "backend rework", "django migration"). limit: Max results (1-20, default 5). memory_type: Filter by type (pattern/workflow/error/decision/discovery). Optional. min_confidence: Drop learned_patterns with confidence below this value (0.0-1.0). Default 0.3 (skips decayed noise). 0.0 = no filter. since_days: Drop rows older than now-since_days. 0 = no cap. Common: 90 (one quarter) for "recent" queries.

Returns: str: JSON with results list [{id, title, confidence, impact_score, memory_type, source_table}].

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo
queryYes
since_daysNo
memory_typeNo
min_confidenceNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

Goes far beyond annotations by explaining the read-only nature over memory rows (with telemetry writes), the stage-1 metadata pre-filter behavior, and the rationale for defaults (e.g., stale patterns crowding out fresh hits). This adds substantial context without contradicting annotations.

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 well-structured with sections for usage, pre-filter behavior, args, and returns. Every sentence adds value—no filler. The length is justified by the complexity and the need to explain nuanced default behavior.

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?

Given 5 parameters, one required, no enums, and an output schema, the description is complete. It covers all parameters, provides examples, clarifies defaults, explains the return format, and even notes the telemetry writes—no obvious gaps for an agent to invoke it 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?

With 0% schema description coverage, the description fully compensates by explaining each parameter with examples, defaults, and behavioral implications (e.g., min_confidence drops decayed patterns before ranking; since_days age opt-in rationale). It also provides common usage like since_days=90 for recent queries.

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 starts with a specific verb and resource: 'Search observations and learned patterns' with a distinguishing feature '5-signal ranking'. This clearly separates it from sibling search tools like cos_doc_search and cos_task_search, which target different resources.

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?

Explicitly states 'Use during Orient step to find relevant past experience', providing a clear temporal context. It also warns that reinforcement should happen via cos_details, not here, offering an explicit alternative and when-not-to-use guidance.

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/kouroshez/coding-os'

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