bear_context_add
Tag a Bear note with #context to add it to a curated library for LLM knowledge bases. Optionally specify a subtag for grouping like #context/jira.
Instructions
Add a Bear note to the context library by tagging it with #context. Optionally specify a subtag for grouping (e.g., subtag 'jira' → #context/jira). Triggers a sync after tagging.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Note ID (uniqueIdentifier) | |
| subtag | No | Optional sub-tag for grouping (e.g., 'architecture', 'jira') |
Implementation Reference
- mcp-server/src/tools.ts:897-928 (registration)The tool 'bear_context_add' is registered as a ToolHandler entry in the tools record with its name, description, inputSchema, annotations, and buildArgs function. Its buildArgs constructs CLI arguments for 'bcli context add <id> --json' with an optional '--subtag' flag.
bear_context_add: { tool: { name: "bear_context_add", description: "Add a Bear note to the context library by tagging it with #context. Optionally specify a subtag for grouping (e.g., subtag 'jira' → #context/jira). Triggers a sync after tagging.", inputSchema: { type: "object" as const, properties: { id: { type: "string", description: "Note ID (uniqueIdentifier)", }, subtag: { type: "string", description: "Optional sub-tag for grouping (e.g., 'architecture', 'jira')", }, }, required: ["id"], }, annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: true, }, }, buildArgs: (input) => { const args = ["context", "add", String(input.id), "--json"]; if (input.subtag) args.push("--subtag", String(input.subtag)); return args; }, }, - mcp-server/src/tools.ts:902-916 (schema)Input schema definition for bear_context_add: accepts 'id' (string, required) and 'subtag' (string, optional).
inputSchema: { type: "object" as const, properties: { id: { type: "string", description: "Note ID (uniqueIdentifier)", }, subtag: { type: "string", description: "Optional sub-tag for grouping (e.g., 'architecture', 'jira')", }, }, required: ["id"], }, - mcp-server/src/tools.ts:923-927 (handler)buildArgs function that generates CLI arguments: ['context', 'add', <id>, '--json'] with optional subtag parameter.
buildArgs: (input) => { const args = ["context", "add", String(input.id), "--json"]; if (input.subtag) args.push("--subtag", String(input.subtag)); return args; },