bear_context_triage
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
| Name | Required | Description | Default |
|---|---|---|---|
| filename | Yes | Filename in inbox/ to triage | |
| action | Yes | Triage action: keep (move to external/), push_to_bear (create Bear note), or discard (delete) | |
| group | No | Group label (used with 'keep' action) | |
| subtag | No | Sub-tag for Bear note (used with 'push_to_bear' action, e.g., 'jira' → #context/jira) | |
| summary | No | Short summary (used with 'keep' action) |
Implementation Reference
- mcp-server/src/tools.ts:1041-1081 (schema)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, }, - mcp-server/src/tools.ts:1083-1096 (handler)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; }, }, - mcp-server/src/index.ts:15-29 (registration)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 () => ({