Skip to main content
Glama

request_intro

Propose an introduction to a matched contact through mutual approval. Send a message explaining the value, requiring both parties to consent before connecting.

Instructions

Propose an introduction to someone you matched with. They'll see your message and can approve or decline. Nothing happens without both sides saying yes.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
match_idYesMatch ID from search_matches
toYesAgent ID of the person you want to meet
messageYesShort message explaining why this intro would be valuable

Implementation Reference

  • Handler function that executes the request_intro tool logic. Makes POST request to /api/intros endpoint with match details, agent credentials, and cryptographic signature. Returns intro ID and pending status on success, or error message on failure.
    async (args) => {
      try {
        const result = await api("/api/intros", {
          method: "POST",
          body: JSON.stringify({
            matchId: args.match_id,
            targetAgentId: args.to,
            message: args.message,
            fieldsToDisclose: ["needs", "offers"],
            agentId,
            publicKey: keys.publicKey,
            signature: sign(args.match_id + args.message, keys.privateKey),
          }),
        });
    
        if (result.error) return { content: [{ type: "text" as const, text: `Failed: ${result.error}` }], isError: true };
    
        return {
          content: [{
            type: "text" as const,
            text: JSON.stringify({
              introId: result.introId,
              status: "pending",
              to: args.to,
              note: "Intro request sent. They'll see it in their digest.",
            }, null, 2),
          }],
        };
      } catch (e: any) {
        return { content: [{ type: "text" as const, text: `Network error: ${e.message}` }], isError: true };
      }
    }
  • Input schema defining three required string parameters: match_id (from search results), to (target agent ID), and message (explanation for the intro).
    {
      match_id: z.string().describe("Match ID from search_matches"),
      to: z.string().describe("Agent ID of the person you want to meet"),
      message: z.string().describe("Short message explaining why this intro would be valuable"),
    },
  • src/index.ts:199-239 (registration)
    Complete tool registration calling server.tool() with name 'request_intro', description, input schema, and handler function. Registers the tool with the MCP server.
    server.tool(
      "request_intro",
      "Propose an introduction to someone you matched with. They'll see your message and can approve or decline. Nothing happens without both sides saying yes.",
      {
        match_id: z.string().describe("Match ID from search_matches"),
        to: z.string().describe("Agent ID of the person you want to meet"),
        message: z.string().describe("Short message explaining why this intro would be valuable"),
      },
      async (args) => {
        try {
          const result = await api("/api/intros", {
            method: "POST",
            body: JSON.stringify({
              matchId: args.match_id,
              targetAgentId: args.to,
              message: args.message,
              fieldsToDisclose: ["needs", "offers"],
              agentId,
              publicKey: keys.publicKey,
              signature: sign(args.match_id + args.message, keys.privateKey),
            }),
          });
    
          if (result.error) return { content: [{ type: "text" as const, text: `Failed: ${result.error}` }], isError: true };
    
          return {
            content: [{
              type: "text" as const,
              text: JSON.stringify({
                introId: result.introId,
                status: "pending",
                to: args.to,
                note: "Intro request sent. They'll see it in their digest.",
              }, null, 2),
            }],
          };
        } catch (e: any) {
          return { content: [{ type: "text" as const, text: `Network error: ${e.message}` }], isError: true };
        }
      }
    );
  • Helper function that wraps fetch API calls with required headers including agent ID and public key for authentication. Used by the request_intro handler to communicate with the backend API.
    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