Skip to main content
Glama

bear_get_tags

Read-onlyIdempotent

Retrieve the full tag hierarchy from Bear, including note counts and pin status, to understand note organization.

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

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Definition of the bear_get_tags tool including schema (no input parameters), description, annotations, and buildArgs which produces the CLI args ['tags', '--json'].
    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"],
    },
  • The tool is registered via the ListToolsRequestSchema handler which iterates over all tools (including bear_get_tags) and returns their definitions.
    server.setRequestHandler(ListToolsRequestSchema, async () => ({
      tools: Object.values(tools).map((t) => t.tool),
    }));
  • Generic tool execution handler in index.ts: calls handler.buildArgs(params) (which for bear_get_tags returns ['tags', '--json']), executes bcli with those args, and returns the JSON output.
    const args = handler.buildArgs(params);
    let result: { stdout: string; stderr: string };
    
    // Check if this tool needs stdin piping
    const stdinData = handler.usesStdin?.(params) ?? null;
    if (stdinData !== null) {
      result = await execBcliWithStdinAndReauth(args, stdinData);
    } else {
      result = await execBcliWithReauth(args);
    }
    
    // Parse JSON output from bcli
    const stdout = result.stdout.trim();
    if (!stdout) {
      return {
        content: [{ type: "text", text: "Command completed successfully." }],
      };
    }
    
    // Validate it's JSON and pretty-print
    try {
      const parsed = JSON.parse(stdout);
      return {
        content: [
          { type: "text", text: JSON.stringify(parsed, null, 2) },
        ],
      };
    } catch {
      // If bcli returned non-JSON, pass it through
      return {
        content: [{ type: "text", text: stdout }],
      };
    }
Behavior4/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, so the safety profile is clear. The description adds value by specifying the output contains all tags with note counts and pin status, which is useful behavioral context beyond the annotations.

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 concise with just two sentences. The first sentence immediately states the tool's action and resource, and the second adds detail. No unnecessary words or clauses.

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?

Despite lacking an output schema, the description explicitly states what the tool returns (all tags with note counts and pin status). For a zero-parameter read operation, this is complete and sufficient for an agent to understand the tool's purpose and output.

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?

There are no parameters, so the schema coverage is 100%. According to the guidelines, 0 parameters earns a baseline of 4, and the description does not need to elaborate on parameters.

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 retrieves the full tag hierarchy from Bear, specifying it returns all tags with their note counts and pin status. This is a specific verb+resource that distinguishes it from sibling tools like bear_add_tag or bear_delete_tag.

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

Usage Guidelines3/5

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

The description mentions it is 'useful for understanding how notes are organized' but does not provide explicit guidance on when to use it versus alternatives, nor does it specify any exclusions or prerequisites. The usage context is implied rather than explicit.

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

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