Skip to main content
Glama

search_instincts

Find patterns by keyword across pattern key, metadata, and explain text. Uses FTS5 for fast ranked retrieval, with automatic fallback to LIKE for special characters.

Instructions

Find patterns by keyword across pattern key, metadata, and explain text.

    Uses SQLite FTS5 for ranked, fast retrieval. Falls back to LIKE
    substring matching automatically when the query contains special
    characters that FTS5 cannot tokenize. Read-only; no side effects.

    FTS5 query syntax:
      - Bare word "lint" — matches any record containing the token.
      - Multi-word "lint fix" — implicit AND; both tokens must appear.
      - Explicit "lint OR format" — either token.
      - Phrase '"exact phrase"' — contiguous match (note embedded quotes).
      - Prefix "claude*" — any token starting with claude.
      - Negation "lint NOT prettier" — excludes matches containing the
        second term.

    For exact-key lookup use get_instinct(). For unfiltered browsing or
    category/project filters without a keyword, use list_instincts().

    Args:
        query: Search term in FTS5 syntax (see above). Case-insensitive.
            Special characters trigger automatic LIKE fallback.
        limit: Maximum results to return. Default 20; raise for broad
            audits, lower for suggest-like focused views.

    Returns:
        {"results": [<record>, ...], "count": int, "hint": str}

        Each <record> has: "pattern" (str key with prefix),
        "category" ("sequence"|"preference"|"fix_pattern"|"combo"),
        "confidence" (int observation count),
        "promoted" (0=raw, 1=mature, 2=rule, 3=universal),
        "level" ("raw"|"mature"|"rule"|"universal"),
        "project" (str fingerprint, "" = global),
        "source" (str origin tag), "metadata" (parsed dict),
        "explain" (str human note),
        "first_seen" and "last_seen" (ISO 8601 timestamps).

        Ordered by confidence descending. Empty "results" means no match;
        the "hint" points to list_instincts() or get_instinct() as
        fallback next steps.
    

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYes
limitNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

Discloses read-only nature, FTS5 behavior, automatic fallback to LIKE, and return format. With no annotations, this covers key traits effectively, though potential issues like timeouts are not mentioned.

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?

Well-structured with sections and examples, but slightly verbose; every sentence adds value, but could be tightened slightly.

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?

Covers search behavior, syntax, fallback, return schema, ordering, and fallback next steps, making it fully self-contained for an AI 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?

Schema coverage is 0%, but the description explains the query parameter with FTS5 syntax and the limit parameter with default and usage guidance, adding substantial meaning.

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 finds patterns by keyword across specified fields and distinguishes from sibling tools (get_instinct, list_instincts).

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 when to use alternatives: 'For exact-key lookup use get_instinct(). For unfiltered browsing or category/project filters without a keyword, use list_instincts().' Also advises on limit adjustments.

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