Skip to main content
Glama

agentbay_knowledge_manage

Manage knowledge entries by archiving, deleting, confirming, or contradicting them within a project for persistent AI agent memory.

Instructions

Archive, delete, confirm, or contradict knowledge entries

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
knowledgeIdYesKnowledge entry ID
actionYes
projectIdYesProject ID

Implementation Reference

  • The actual handler for the agentbay_knowledge_manage tool. It uses apiDelete for 'delete'/'deprecate' actions and apiPatch for 'confirm'/'contradict' actions against the project knowledge API endpoint.
    // Tool 17: Knowledge Manage
    server.tool(
      'agentbay_knowledge_manage',
      'Archive, delete, confirm, or contradict knowledge entries',
      {
        knowledgeId: z.string().describe('Knowledge entry ID'),
        action: z.enum(['deprecate', 'delete', 'confirm', 'contradict']),
        projectId: z.string().describe('Project ID'),
      },
      async ({ knowledgeId, action, projectId }) => {
        if (action === 'delete' || action === 'deprecate') {
          const data = await apiDelete(`/api/v1/projects/${projectId}/knowledge`, { knowledgeId, action });
          if (data.error) return { content: [{ type: 'text' as const, text: `Error: ${data.error}` }] };
          return { content: [{ type: 'text' as const, text: action === 'delete' ? `Deleted ${data.deleted} entry.` : `Archived ${data.archived} entry.` }] };
        } else {
          const data = await apiPatch(`/api/v1/projects/${projectId}/knowledge`, { knowledgeId, action });
          if (data.error) return { content: [{ type: 'text' as const, text: `Error: ${data.error}` }] };
          return { content: [{ type: 'text' as const, text: `Knowledge ${action}ed: "${data.title}"\nConfidence: ${data.confidence}${data.isDeprecated ? ' (auto-deprecated)' : ''}` }] };
        }
      }
    );
  • Input schema definition for agentbay_knowledge_manage: requires knowledgeId (string), action (enum: deprecate/delete/confirm/contradict), and projectId (string).
    server.tool(
      'agentbay_knowledge_manage',
      'Archive, delete, confirm, or contradict knowledge entries',
      {
        knowledgeId: z.string().describe('Knowledge entry ID'),
        action: z.enum(['deprecate', 'delete', 'confirm', 'contradict']),
        projectId: z.string().describe('Project ID'),
      },
  • src/index.ts:364-384 (registration)
    Tool registration via server.tool() call with the name 'agentbay_knowledge_manage' and description 'Archive, delete, confirm, or contradict knowledge entries'.
    // Tool 17: Knowledge Manage
    server.tool(
      'agentbay_knowledge_manage',
      'Archive, delete, confirm, or contradict knowledge entries',
      {
        knowledgeId: z.string().describe('Knowledge entry ID'),
        action: z.enum(['deprecate', 'delete', 'confirm', 'contradict']),
        projectId: z.string().describe('Project ID'),
      },
      async ({ knowledgeId, action, projectId }) => {
        if (action === 'delete' || action === 'deprecate') {
          const data = await apiDelete(`/api/v1/projects/${projectId}/knowledge`, { knowledgeId, action });
          if (data.error) return { content: [{ type: 'text' as const, text: `Error: ${data.error}` }] };
          return { content: [{ type: 'text' as const, text: action === 'delete' ? `Deleted ${data.deleted} entry.` : `Archived ${data.archived} entry.` }] };
        } else {
          const data = await apiPatch(`/api/v1/projects/${projectId}/knowledge`, { knowledgeId, action });
          if (data.error) return { content: [{ type: 'text' as const, text: `Error: ${data.error}` }] };
          return { content: [{ type: 'text' as const, text: `Knowledge ${action}ed: "${data.title}"\nConfidence: ${data.confidence}${data.isDeprecated ? ' (auto-deprecated)' : ''}` }] };
        }
      }
    );
Behavior2/5

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

No annotations are provided, so the description must carry the full burden of behavioral disclosure. The description lists actions but does not explain what each action does (e.g., whether 'confirm' is reversible, whether 'delete' is permanent, or what 'contradict' entails). There is no mention of permissions, side effects, or constraints. This is insufficient for a mutation tool managing knowledge entries.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence, making it concise. However, it contains an inaccuracy ('archive' vs 'deprecate') and omits context that would make the sentence more valuable. The structure is acceptable for a short description, but the mismatch reduces clarity.

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

Completeness2/5

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

No output schema is present, so the description should explain return values or outcomes. The tool performs four distinct mutations, yet the description gives no detail about what happens after each action, error conditions, or how to interpret results. This is inadequate given the tool's complexity.

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

Parameters2/5

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

Schema coverage is 67%, meaning two of three parameters have descriptions, but the description does not add any extra meaning beyond the schema. The 'action' parameter has an enum but the description uses 'archive' instead of 'deprecate', which conflicts. The parameter semantics are not enhanced; the agent must rely on the schema alone.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states the verb 'manage' and the resource 'knowledge entries', listing specific actions (archive, delete, confirm, contradict). This clearly distinguishes it from sibling tools like agentbay_knowledge_query or agentbay_knowledge_record, which are read-only or different operations. However, the term 'archive' does not match the schema's enum value 'deprecate', causing slight confusion.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It does not mention prerequisites, typical use cases, or situations where a different tool (e.g., agentbay_knowledge_record for creation) would be preferred. The agent must infer usage from the action list alone.

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/thomasjumper/agentbay-mcp'

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