Skip to main content
Glama

consolidate_decisions

Read-onlyIdempotent

Find and merge duplicate decisions by semantic similarity analysis. Uses LLM to evaluate candidates and can apply merges or invalidations.

Instructions

LLM-driven semantic dedup of the decision store. For each decision in scope, finds top-K similar candidates (FTS + title-trigram) and asks the LLM to merge / replace / invalidate where appropriate. Mutating; respects dry_run (default true). Requires an active AI provider. Returns: { evaluated, verdicts: [{subject_id, verdict, affected_ids}], applied_count, dry_run }.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_rootNoProject root to consolidate (default: current project).
service_nameNoFilter input + scope of consolidation to this subproject.
max_decisionsNoCost guard: max subject decisions evaluated per call (default: config.memory.consolidation.defaultMaxDecisions or 50).
min_title_similarityNoMinimum trigram-title similarity for candidate consideration (default: config.memory.consolidation.defaultMinTitleSimilarity or 0.4).
same_type_onlyNoWhen true, only compare decisions of the same DecisionType (more conservative; default: config or false).
dry_runNoWhen true (default), compute verdicts without writing. Set false to apply merges / invalidations.
Behavior1/5

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

The description states the tool is 'mutating', but annotations declare readOnlyHint=true, creating a direct contradiction. The description does not clarify the contradiction or disclose side effects beyond dry_run. Transparency is severely undermined.

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 three sentences, front-loaded with purpose, efficiently covering key points (process, mutation, dry_run, requirements, returns). No fluff or redundancy.

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?

Given the complexity (LLM-driven, 6 parameters, no output schema), the description covers the high-level process, return format, mutation safeguard, and prerequisite. It lacks mention of cost, rate limits, or permissions, but is largely complete.

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?

All six parameters are documented in the schema (100% coverage), so baseline is 3. The description adds high-level context about the consolidation process but does not significantly extend parameter meaning beyond the schema descriptions.

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 clearly states it is for LLM-driven semantic dedup of decisions, specifying the method (FTS + title-trigram) and action (merge/replace/invalidate). It distinguishes from siblings like 'check_duplication' by noting it is mutating and respects dry_run.

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

Usage Guidelines3/5

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

The description mentions a prerequisite (active AI provider) and default dry_run, but does not explicitly state when to use this tool versus alternatives like 'check_duplication' or 'get_decision_clusters'. The usage context is implied but not fully guided.

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/nikolai-vysotskyi/trace-mcp'

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