Skip to main content
Glama

agentbay_agent_memory_revoke

Revoke another agent's access to your agent memory by providing its Agent ID. Use this to remove previously granted permissions and control which agents can retrieve your stored information.

Instructions

Revoke another agent's access to your agent memory

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
targetAgentIdYesAgent ID to revoke access from

Implementation Reference

  • The handler function for the 'agentbay_agent_memory_revoke' tool. It revokes another agent's read/write access to the calling agent's memory by calling GET /api/v1/me to resolve the agent ID, then DELETE /api/v1/agents/{agentId}/memory/permissions with the targetAgentId as a query parameter.
    // Tool 22: Agent Memory Revoke
    server.tool(
      'agentbay_agent_memory_revoke',
      'Revoke another agent\'s access to your agent memory',
      {
        targetAgentId: z.string().describe('Agent ID to revoke access from'),
      },
      async ({ targetAgentId }) => {
        const meData = await apiGet('/api/v1/me');
        if (!meData.agentId) return { content: [{ type: 'text' as const, text: 'Error: No agent linked to this API key.' }] };
    
        const data = await apiDelete(`/api/v1/agents/${meData.agentId}/memory/permissions?targetAgentId=${targetAgentId}`);
        if (data.error) return { content: [{ type: 'text' as const, text: `Error: ${data.error}` }] };
        return { content: [{ type: 'text' as const, text: data.message || 'Permission revoked.' }] };
      }
    );
  • src/index.ts:501-516 (registration)
    The tool is registered via server.tool() with the name 'agentbay_agent_memory_revoke' and a description of 'Revoke another agent's access to your agent memory'.
    // Tool 22: Agent Memory Revoke
    server.tool(
      'agentbay_agent_memory_revoke',
      'Revoke another agent\'s access to your agent memory',
      {
        targetAgentId: z.string().describe('Agent ID to revoke access from'),
      },
      async ({ targetAgentId }) => {
        const meData = await apiGet('/api/v1/me');
        if (!meData.agentId) return { content: [{ type: 'text' as const, text: 'Error: No agent linked to this API key.' }] };
    
        const data = await apiDelete(`/api/v1/agents/${meData.agentId}/memory/permissions?targetAgentId=${targetAgentId}`);
        if (data.error) return { content: [{ type: 'text' as const, text: `Error: ${data.error}` }] };
        return { content: [{ type: 'text' as const, text: data.message || 'Permission revoked.' }] };
      }
    );
  • The input schema defines a single required parameter 'targetAgentId' (string) describing the agent ID to revoke access from.
    {
      targetAgentId: z.string().describe('Agent ID to revoke access from'),
    },
  • The apiDelete helper function used by the handler to make the DELETE request to revoke permissions.
    async function apiDelete(path: string, body?: unknown) {
      const res = await fetch(`${API_BASE}${path}`, {
        method: 'DELETE',
        headers: getHeaders(),
        ...(body ? { body: JSON.stringify(body) } : {}),
      });
      return res.json();
    }
Behavior2/5

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

No annotations are provided, so the description carries full burden. It only states the basic action without disclosing side effects, permission requirements, or reversibility.

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 a single sentence with no unnecessary words, making it concise and front-loaded.

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

Completeness3/5

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

For a simple tool with one param and no output schema, the description is minimally adequate but lacks usage guidelines and behavioral context to be fully complete.

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% with a description for targetAgentId. The description adds no additional meaning beyond what the schema already provides.

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 uses a specific verb ('Revoke') and resource ('another agent's access to your agent memory'), clearly distinguishing it from siblings like grant or query.

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?

No guidance on when to use this tool vs alternatives (e.g., agentbay_agent_memory_grant). No prerequisites or exclusions are mentioned.

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