Skip to main content
Glama

bear_context_set_prefix

Idempotent

Update the tag prefix for your context library, re-tagging all Bear notes with the new prefix while preserving sub-tags. Aligns qualifier tags with naming schemes like Johnny Decimal.

Instructions

Change the context library's tag prefix and re-tag every Bear note that currently uses the old prefix. Sub-tags are preserved — #context/research becomes #<new>/research. Updates both the markdown body and the CloudKit tag index, and persists the new prefix to the context config. Useful when aligning the qualifier tag with a broader naming scheme like Johnny Decimal (e.g. '10-projects'). Run bear_context_sync afterwards to refresh the library.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
new_prefixYesNew tag prefix without the leading #. Example: '10-projects'.

Implementation Reference

  • Input schema for bear_context_set_prefix - requires a new_prefix string for the tag prefix
    inputSchema: {
      type: "object" as const,
      properties: {
        new_prefix: {
          type: "string",
          description:
            "New tag prefix without the leading #. Example: '10-projects'.",
        },
      },
      required: ["new_prefix"],
  • Builds CLI args: calls 'bcli context set-prefix <new_prefix> --json' to change the context library's tag prefix and re-tag notes
    buildArgs: (input) => [
      "context",
      "set-prefix",
      String(input.new_prefix),
      "--json",
    ],
  • Registration of bear_context_set_prefix tool in the tools registry with its name, description, input schema, and buildArgs
    bear_context_set_prefix: {
      tool: {
        name: "bear_context_set_prefix",
        description:
          "Change the context library's tag prefix and re-tag every Bear note that currently uses the old prefix. Sub-tags are preserved — `#context/research` becomes `#<new>/research`. Updates both the markdown body and the CloudKit tag index, and persists the new prefix to the context config. Useful when aligning the qualifier tag with a broader naming scheme like Johnny Decimal (e.g. '10-projects'). Run `bear_context_sync` afterwards to refresh the library.",
        inputSchema: {
          type: "object" as const,
          properties: {
            new_prefix: {
              type: "string",
              description:
                "New tag prefix without the leading #. Example: '10-projects'.",
            },
          },
          required: ["new_prefix"],
        },
        annotations: {
          readOnlyHint: false,
          destructiveHint: false,
          idempotentHint: true,
        },
      },
Behavior5/5

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

Discloses that the operation is not read-only (readOnlyHint=false), not destructive (destructiveHint=false), and idempotent (idempotentHint=true). The description details side effects: re-tagging all notes, updating markdown body and CloudKit tag index, and persisting the new prefix. No contradictions with 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?

Two densely informative sentences with no wasted words. Front-loaded with the action and scope, then details effects and usage context efficiently.

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

Completeness4/5

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

Covers key behavioral aspects (sub-tag preservation, index/config updates) and post-step. However, missing information about return value or confirmation, and could mention reversibility or undo strategy for a bulk operation. Still, adequate for the tool's complexity given annotations.

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

Parameters3/5

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

Schema coverage for the single parameter is 100% with a clear description and example. The description adds no additional semantic information about the parameter beyond what the schema provides, so baseline score of 3 is appropriate.

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?

Clearly states the verb 'change' and the resource 'tag prefix', with scope ('re-tag every Bear note that currently uses the old prefix') and sub-tag preservation. Distinguishes from sibling tools like bear_rename_tag by describing a bulk prefix change across all notes.

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?

Provides a concrete use case ('aligning with broader naming scheme like Johnny Decimal') and a post-step ('Run bear_context_sync afterwards'). Does not explicitly mention when not to use or alternative tools, but the context is clear enough for the intended scenario.

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