Skip to main content
Glama

agent_inbox

Check pending messages for agents to monitor revenue opportunities, bounties, grants, and freelance gigs with deadline tracking.

Instructions

Read pending messages for an agent

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
agentYesAgent name to check inbox for

Implementation Reference

  • The handler for the 'agent_inbox' tool, which filters pending messages for a specific agent (or 'ALL'), returns them, and removes them from the database.
    case "agent_inbox": {
      const db = loadDB();
      const agent = (args as any).agent;
      const messages = db.messages.filter(
        (m) => m.to === agent || m.to === "ALL"
      );
      if (messages.length === 0) {
        return { content: [{ type: "text", text: `No messages for ${agent}` }] };
      }
      // Remove read messages
      db.messages = db.messages.filter(
        (m) => m.to !== agent && m.to !== "ALL"
      );
      saveDB(db);
      return {
        content: [{
          type: "text",
          text: `INBOX for ${agent} (${messages.length} messages):\n\n${messages.map((m) => `[${m.priority.toUpperCase()}] ${m.from} → ${m.type}: ${m.content}\n  ${m.timestamp}`).join("\n\n")}`,
        }],
      };
    }
  • src/index.ts:348-357 (registration)
    Registration of the 'agent_inbox' tool in the tool list provided by the MCP server.
      name: "agent_inbox",
      description: "Read pending messages for an agent",
      inputSchema: {
        type: "object" as const,
        required: ["agent"],
        properties: {
          agent: { type: "string", description: "Agent name to check inbox for" },
        },
      },
    },

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/ElromEvedElElyon/revenue-mcp'

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