bear_get_tags
Retrieve the full tag hierarchy from Bear, including note counts and pin status, to understand how notes are organized.
Instructions
Get the full tag hierarchy from Bear. Returns all tags with their note counts and pin status. Useful for understanding how notes are organized.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- mcp-server/src/tools.ts:129-145 (handler)The 'bear_get_tags' tool handler definition in the tools registry. The buildArgs function generates args ['tags', '--json'] which calls the 'bcli' CLI with the 'tags' subcommand to fetch the full tag hierarchy from Bear. No input parameters are required.
bear_get_tags: { tool: { name: "bear_get_tags", description: "Get the full tag hierarchy from Bear. Returns all tags with their note counts and pin status. Useful for understanding how notes are organized.", inputSchema: { type: "object" as const, properties: {}, }, annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true, }, }, buildArgs: () => ["tags", "--json"], }, - mcp-server/src/tools.ts:131-136 (schema)Input schema for bear_get_tags — defines 'name', 'description', and an empty 'inputSchema' (no parameters required).
name: "bear_get_tags", description: "Get the full tag hierarchy from Bear. Returns all tags with their note counts and pin status. Useful for understanding how notes are organized.", inputSchema: { type: "object" as const, properties: {}, - mcp-server/src/index.ts:29-31 (registration)Tools are registered with the MCP server via ListToolsRequestSchema, which extracts all tool definitions from the tools object (including bear_get_tags).
server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: Object.values(tools).map((t) => t.tool), })); - mcp-server/src/index.ts:33-42 (registration)CallToolRequestSchema handler looks up tools by name (including 'bear_get_tags') from the tools registry and dispatches to buildArgs + bcli execution.
server.setRequestHandler(CallToolRequestSchema, async (request) => { const { name, arguments: input } = request.params; const handler = tools[name]; if (!handler) { return { content: [{ type: "text", text: `Unknown tool: ${name}` }], isError: true, }; }