Skip to main content
Glama

consolidate

Automatically promote observed patterns to behavioral rules based on confidence thresholds and detect sequential action chains.

Instructions

Re-evaluate pattern levels; promote via confidence thresholds and detect chains.

    Promotes patterns that crossed a level boundary since the last run:
    raw -> mature (confidence >= 5), mature -> rule (>= 10), rule ->
    universal (observed in 2+ distinct projects). Patterns seen in the
    last 7 days get a +1 recency bonus toward the mature threshold.

    Side effects: (1) writes new "promoted" values, (2) runs detect_chains()
    to discover sequential patterns from the observation log, (3) rebuilds
    the FTS5 search index. Idempotent across promotion: already-promoted
    patterns are untouched. session_summary() invokes this automatically.

    Call after a bulk import_patterns() / import_claude_md() or at the
    end of an agent session so downstream queries (suggest,
    export_rules, inject_claude_md) see the latest promotions.

    Returns:
        {"promoted_to_mature": int, "promoted_to_rule": int,
         "promoted_to_universal": int, "chains_detected": int,
         "chains_created": int, "total": int, "timestamp": iso8601}

        "total" is the current row count after promotion. "chains_*"
        fields reflect the bundled detect_chains() pass: "detected"
        counts candidate pairs above threshold, "created" counts new
        seq:A->B records actually inserted.
    

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

With no annotations provided, the description thoroughly discloses side effects: writes promoted values, runs detect_chains(), rebuilds FTS5 index. It also states idempotency (already-promoted patterns untouched) and details the exact return structure. This fully informs the agent of consequences.

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 well-structured with clear sections: action, thresholds, side effects, return value. It is slightly verbose but every sentence adds value. The front-loading is effective.

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 complexity and presence of an output schema in the description, the description is complete. It explains the return fields in detail, covers side effects, and provides usage context. No gaps remain for decision-making.

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 tool has zero parameters and schema coverage is 100%. The description provides no parameter info, but none is needed. The description adds value by explaining the tool's behavior without needing parameter semantics.

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 the tool re-evaluates pattern levels and promotes based on confidence thresholds with specific rules for each level. It distinguishes itself from sibling tools like detect_chains by noting that detect_chains is invoked internally, and mentions that session_summary calls it automatically, providing context for when to use it.

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?

The description explicitly states when to call consolidate: after bulk imports (import_patterns, import_claude_md) or at the end of an agent session. It also notes that session_summary invokes it automatically, giving guidance on when manual invocation is unnecessary. This clearly differentiates from 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/WRG-11/instinct'

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