Skip to main content
Glama

cos_search

Search stored observations and learned patterns with signal-ranked results. Filter by confidence and age to retrieve relevant past experience for current tasks.

Instructions

Search observations and learned patterns with 5-signal ranking.

Use during Orient step to find relevant past experience. Read-only over memory rows: retrieval telemetry only. Neither this tool nor cos_details moves confidence — only cos_learn_validate does.

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?

Despite annotations being present, the description adds significant behavioral context: 'Read-only over memory rows: retrieval telemetry only' and details about the pre-filter (min_confidence, since_days) and their effect on ranking. It also explains that the tool does not modify confidence, which is beyond what annotations convey. No contradiction with annotations; the readOnlyHint=false is reconciled by the telemetry side-effect.

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 moderately long but every sentence carries value. It is well-structured with clear sections (intro, usage, stage-1 pre-filter, Args, Returns) and is front-loaded with the core purpose. No fluff or repetition beyond reinforcing important distinctions.

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 the tool has 5 parameters, no schema-level descriptions, and an output schema, the description covers everything needed: parameter semantics, use case, behavioral constraints, and return format. It even explains the staging of filtering and the reason for default values, making it fully self-contained for an agent.

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?

The schema has 0% description coverage, but the description fully compensates with an 'Args:' section that explains every parameter, including defaults, valid ranges, and behavioral implications. For example, 'min_confidence: Drop learned_patterns with confidence below this value (0.0-1.0). Default 0.3 (skips decayed noise).' This adds meaning far beyond the bare schema.

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 5-signal ranking.' This clearly distinguishes the tool from siblings like cos_doc_search or cos_graph_search by focusing on observations and learned patterns. The reference to the 'Orient step' further contextualizes its unique role.

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 explicit when-to-use guidance: 'Use during Orient step to find relevant past experience.' It also differentiates itself from related tools: 'Neither this tool nor cos_details moves confidence — only cos_learn_validate does.' This gives the agent a clear decision rule for when to rely on this tool versus alternatives.

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