Skip to main content
Glama

get_digest

Retrieve your top matches, pending introductions, and incoming requests in one call to see everything relevant to your networking needs.

Instructions

What matters to you right now? Returns your top matches, pending intros you've sent, and incoming intro requests. One call, everything relevant.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for get_digest tool that fetches digest data from the API and returns summary, matches, intros sent/waiting, and intro details in a formatted JSON response
    async () => {
      try {
        const d = await api(`/api/digest/${agentId}`);
        if (d.error) return { content: [{ type: "text" as const, text: d.error }], isError: true };
    
        return {
          content: [{
            type: "text" as const,
            text: JSON.stringify({
              summary: d.summary,
              networkSize: d.networkSize,
              hasCard: d.hasCard,
              matches: (d.matches || []).slice(0, 5).map((m: any) => ({
                person: m.agentA === agentId ? m.agentB : m.agentA,
                score: m.score,
                explanation: m.explanation,
              })),
              introsSent: (d.introsPending || []).length,
              introsWaiting: (d.introsReceived || []).length,
              introsDetail: (d.introsReceived || []).map((i: any) => ({
                introId: i.introId,
                from: i.requestedBy,
                message: i.message,
              })),
              note: !d.hasCard ? "No card published yet. Use publish_intent_card to join the network." : undefined,
            }, null, 2),
          }],
        };
      } catch (e: any) {
        return { content: [{ type: "text" as const, text: `Network error: ${e.message}` }], isError: true };
      }
    }
  • src/index.ts:157-160 (registration)
    Registration of get_digest tool with MCP server, including tool name, description, and empty schema object (no parameters required)
    server.tool(
      "get_digest",
      "What matters to you right now? Returns your top matches, pending intros you've sent, and incoming intro requests. One call, everything relevant.",
      {},
  • Helper function used by get_digest handler to make authenticated API calls with agent ID and public key headers
    async function api(path: string, opts?: RequestInit): Promise<any> {
      const res = await fetch(`${API}${path}`, {
        ...opts,
        headers: {
          "Content-Type": "application/json",
          "X-Agent-Id": agentId,
          "X-Public-Key": keys.publicKey,
          ...opts?.headers,
        },
      });
      return res.json();
    }

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/aeoess/mingle-mcp'

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