Skip to main content
Glama

import_patterns

Bulk-insert coding patterns into the instinct memory system to seed it from external sources like CSV exports or script outputs, with confidence summation for existing patterns.

Instructions

Bulk-insert many patterns in a single call; faster than looping observe().

    Use this to seed the store from an external source — a CSV export,
    another project's instinct DB, or patterns extracted by a script.
    For patterns already present, confidence is summed (not replaced),
    matching observe() semantics.

    For importing from a CLAUDE.md file specifically, prefer
    import_claude_md() which handles the markdown parsing for you.

    Args:
        patterns: List of dicts. Each dict requires at minimum a
            "pattern" key. Optional keys: "category" (sequence |
            preference | fix_pattern | combo), "source", "project",
            "metadata" (dict), "explain" (str), "confidence" (int —
            starting count, defaults to 1).

    Returns:
        Dict with keys: "imported" (int — new patterns created),
        "merged" (int — existing patterns whose confidence rose),
        "errors" (list of {"pattern", "reason"} for rejected rows).
    

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
patternsYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively describes key behaviors: the bulk-insert nature, performance advantage over looping, handling of existing patterns ('confidence is summed, not replaced'), and error handling. It doesn't mention authentication needs, rate limits, or destructive effects, but provides substantial operational context for a mutation tool.

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 efficiently structured with clear sections: purpose statement, usage guidance, behavioral notes, parameter documentation, and return values. Every sentence adds value, with no redundancy. The information is front-loaded with the most important details first.

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?

For a mutation tool with no annotations, 0% schema description coverage, but with output schema, the description provides excellent completeness. It covers purpose, usage context, behavioral semantics, detailed parameter requirements, and return value structure. The agent has all necessary information to correctly invoke this tool.

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 providing comprehensive parameter documentation. It details the 'patterns' parameter structure, required and optional keys, data types, defaults, and constraints. This goes far beyond what the bare schema provides and gives the agent complete understanding of how to structure input.

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's purpose: 'Bulk-insert many patterns in a single call' with the specific verb 'bulk-insert' and resource 'patterns'. It explicitly distinguishes from sibling 'observe()' by noting it's 'faster than looping observe()' and from 'import_claude_md()' by indicating when to prefer that alternative.

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 provides explicit guidance on when to use this tool: 'Use this to seed the store from an external source — a CSV export, another project's instinct DB, or patterns extracted by a script.' It also specifies when not to use it: 'For importing from a CLAUDE.md file specifically, prefer import_claude_md() which handles the markdown parsing for you.' This clearly differentiates it from both 'observe()' and 'import_claude_md()'.

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/yakuphanycl/instinct'

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