Skip to main content
Glama

bear_context_triage

Idempotent

Triage inbox files by moving to external with metadata, creating a tagged Bear note, or discarding. All actions regenerate the index.

Instructions

Triage a file in the inbox. Three actions: 'keep' moves it to external/ with optional group/summary metadata. 'push_to_bear' creates a Bear note tagged #context (+ optional subtag) and deletes the inbox file. 'discard' deletes the file. All actions regenerate the index.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filenameYesFilename in inbox/ to triage
actionYesTriage action: keep (move to external/), push_to_bear (create Bear note), or discard (delete)
groupNoGroup label (used with 'keep' action)
subtagNoSub-tag for Bear note (used with 'push_to_bear' action, e.g., 'jira' → #context/jira)
summaryNoShort summary (used with 'keep' action)

Implementation Reference

  • Schema and input definition for the bear_context_triage tool, defining the tool name, description, accepted parameters (filename, action, group, subtag, summary), and input validation.
    bear_context_triage: {
      tool: {
        name: "bear_context_triage",
        description:
          "Triage a file in the inbox. Three actions: 'keep' moves it to external/ with optional group/summary metadata. 'push_to_bear' creates a Bear note tagged #context (+ optional subtag) and deletes the inbox file. 'discard' deletes the file. All actions regenerate the index.",
        inputSchema: {
          type: "object" as const,
          properties: {
            filename: {
              type: "string",
              description: "Filename in inbox/ to triage",
            },
            action: {
              type: "string",
              enum: ["keep", "push_to_bear", "discard"],
              description:
                "Triage action: keep (move to external/), push_to_bear (create Bear note), or discard (delete)",
            },
            group: {
              type: "string",
              description:
                "Group label (used with 'keep' action)",
            },
            subtag: {
              type: "string",
              description:
                "Sub-tag for Bear note (used with 'push_to_bear' action, e.g., 'jira' → #context/jira)",
            },
            summary: {
              type: "string",
              description:
                "Short summary (used with 'keep' action)",
            },
          },
          required: ["filename", "action"],
        },
        annotations: {
          readOnlyHint: false,
          destructiveHint: false,
          idempotentHint: true,
        },
  • Handler function (buildArgs) for bear_context_triage that builds CLI arguments from input, constructing a 'context triage' command with filename, action, and optional flags (--group, --subtag, --summary).
      buildArgs: (input) => {
        const args = [
          "context",
          "triage",
          String(input.filename),
          String(input.action),
          "--json",
        ];
        if (input.group) args.push("--group", String(input.group));
        if (input.subtag) args.push("--subtag", String(input.subtag));
        if (input.summary) args.push("--summary", String(input.summary));
        return args;
      },
    },
  • Tools are registered in index.ts by importing the tools map and exposing them via ListToolsRequestSchema. The CallToolRequestSchema handler looks up the tool by name from the tools object and calls its buildArgs function.
    function createServer(): Server {
      const server = new Server(
        {
          name: "better-bear",
          version: "0.4.0",
        },
        {
          capabilities: {
            tools: {},
          },
        },
      );
    
      server.setRequestHandler(ListToolsRequestSchema, async () => ({
Behavior1/5

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

The description contradicts annotations: idempotentHint=true clashes with actions that delete files (non-idempotent), and destructiveHint=false conflicts with discard deleting a file. The description adds useful context (index regeneration) but fails to align with annotations, creating confusion.

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?

Two sentences cover all essential information: actions, effects, and side effects. No filler or redundancy. Well-structured and efficient.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description covers actions and index regeneration, but lacks details on return values, error handling, or behavior when prerequisites are unmet (e.g., file not found). Given the complexity (5 params, no output schema), more context would be helpful, especially to resolve annotation contradictions.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 100% schema coverage, parameters are already described. The description adds value by explicitly linking each optional param (group, subtag, summary) to their respective actions (keep, push_to_bear, keep), enhancing clarity beyond the 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 clearly defines the tool's purpose: triage a file in the inbox with three distinct actions (keep, push_to_bear, discard). Each action is explained concisely, and the scope (inbox files) is specified. This differentiates it from sibling tools like bear_context_push_to_bear or bear_context_remove, which are more specific.

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

Usage Guidelines4/5

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

The description outlines when to use each action and notes that the index is regenerated. However, it does not explicitly state when NOT to use this tool or provide alternatives (e.g., using bear_context_push_to_bear directly). Still, the guidance is sufficiently clear for an agent.

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/mreider/better-bear'

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