Skip to main content
Glama

bear_context_remove_external

DestructiveIdempotent

Remove a file from the external context library and automatically regenerate the index. Use to delete external content that is no longer required.

Instructions

Remove a file from the external/ directory in the context library. Deletes the file and regenerates the index. Use when external content is no longer needed.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filenameYesFilename in external/ to remove

Implementation Reference

  • Tool registration as part of the `tools` Record<string, ToolHandler> export. Maps tool name 'bear_context_remove_external' to its Tool definition and buildArgs function.
      bear_context_remove_external: {
        tool: {
          name: "bear_context_remove_external",
          description:
            "Remove a file from the external/ directory in the context library. Deletes the file and regenerates the index. Use when external content is no longer needed.",
          inputSchema: {
            type: "object" as const,
            properties: {
              filename: {
                type: "string",
                description: "Filename in external/ to remove",
              },
            },
            required: ["filename"],
          },
          annotations: {
            readOnlyHint: false,
            destructiveHint: true,
            idempotentHint: true,
          },
        },
        buildArgs: (input) => [
          "context",
          "remove-external",
          String(input.filename),
          "--json",
        ],
      },
    };
  • Input schema for the tool: requires a single 'filename' string parameter representing the file in external/ to remove.
    inputSchema: {
      type: "object" as const,
      properties: {
        filename: {
          type: "string",
          description: "Filename in external/ to remove",
        },
      },
      required: ["filename"],
    },
  • Handler logic: buildArgs function that generates the command-line arguments to invoke the underlying bcli tool with 'context remove-external'.
    buildArgs: (input) => [
      "context",
      "remove-external",
      String(input.filename),
      "--json",
    ],
  • Registration via ListToolsRequestSchema (line 29-31) and generic dispatch via CallToolRequestSchema (line 33-122) which calls handler.buildArgs(params) then execBcliWithReauth to run the bcli CLI.
    server.setRequestHandler(ListToolsRequestSchema, async () => ({
      tools: Object.values(tools).map((t) => t.tool),
    }));
Behavior4/5

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

Description adds behavioral context beyond annotations: 'deletes the file and regenerates the index'. Annotations already indicate destructive hint, so the description complements well. Could mention permanence or permissions but sufficient.

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 sentences, no filler: first states action, second gives usage guideline. Front-loaded with key information.

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 action, purpose, and usage. No output schema, so return values not needed. Minor gap: doesn't mention error handling or confirmation of success, but overall adequate for a simple tool.

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 is 100%, so description adds no new parameter info. The schema already describes 'filename' adequately. 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?

Description clearly states verb 'remove', resource 'file from external/ directory', and additional actions (deletes file, regenerates index). Differentiates from sibling 'bear_context_remove' by specifying the external directory.

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?

Explicitly says 'Use when external content is no longer needed', providing clear usage context. Does not explicitly state when not to use or alternatives, but the purpose is clear enough.

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