Skip to main content
Glama

rate_connection

Rate a connection after meeting through Mingle. Choose useful, neutral, or not_useful to improve future matching for everyone.

Instructions

Rate a connection you made through Mingle. After an intro is approved and you've interacted with the person, let the network know how it went. This helps improve matching for everyone.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
intro_idYesIntro ID of the connection to rate
ratingYesHow useful was this connection?
commentNoOptional: brief note on why

Implementation Reference

  • src/index.ts:455-484 (registration)
    Registration of the 'rate_connection' tool on the MCP server via server.tool(), defining name, description, and schema.
    server.tool(
      "rate_connection",
      "Rate a connection you made through Mingle. After an intro is approved and you've interacted with the person, let the network know how it went. This helps improve matching for everyone.",
      {
        intro_id: z.string().describe("Intro ID of the connection to rate"),
        rating: z.enum(["useful", "neutral", "not_useful"]).describe("How useful was this connection?"),
        comment: z.string().optional().describe("Optional: brief note on why"),
      },
      async (args) => {
        try {
          const result = await api(`/api/feedback/${args.intro_id}`, {
            method: "POST",
            body: JSON.stringify({
              rating: args.rating,
              comment: args.comment,
            }),
          });
          if (result.error) return { content: [{ type: "text" as const, text: result.error }], isError: true };
          const digest = await fetchDigest();
          return {
            content: [{
              type: "text" as const,
              text: withDigest({ rated: true, introId: args.intro_id, rating: args.rating }, digest),
            }],
          };
        } catch (e: any) {
          return { content: [{ type: "text" as const, text: `Network error: ${e.message}` }], isError: true };
        }
      }
    );
  • Zod schema defining input parameters: intro_id (string), rating (enum: useful/neutral/not_useful), comment (optional string).
    {
      intro_id: z.string().describe("Intro ID of the connection to rate"),
      rating: z.enum(["useful", "neutral", "not_useful"]).describe("How useful was this connection?"),
      comment: z.string().optional().describe("Optional: brief note on why"),
    },
  • Handler function that POSTs feedback to /api/feedback/{intro_id}, then returns result with digest via fetchDigest() and withDigest().
    async (args) => {
      try {
        const result = await api(`/api/feedback/${args.intro_id}`, {
          method: "POST",
          body: JSON.stringify({
            rating: args.rating,
            comment: args.comment,
          }),
        });
        if (result.error) return { content: [{ type: "text" as const, text: result.error }], isError: true };
        const digest = await fetchDigest();
        return {
          content: [{
            type: "text" as const,
            text: withDigest({ rated: true, introId: args.intro_id, rating: args.rating }, digest),
          }],
        };
      } catch (e: any) {
        return { content: [{ type: "text" as const, text: `Network error: ${e.message}` }], isError: true };
      }
    }
  • fetchDigest() helper that fetches network state digest from /api/digest/{agentId} and returns pending intros, matches, etc.
    async function fetchDigest(): Promise<any> {
      try {
        const d = await fetch(`${API}/api/digest/${agentId}`, {
          headers: { "X-Agent-Id": agentId, "X-Public-Key": keys.publicKey },
        }).then(r => r.json());
    
        const rawMatches = d.matches || [];
        const classified = classifyMatches(rawMatches, prefs.mode);
        const surfaceNow = classified.filter((m: any) => m.surfacing === "surface_now");
        const queued = classified.filter((m: any) => m.surfacing === "queue");
    
        return {
          pendingIntros: (d.introsReceived || []).length,
          introsReceived: (d.introsReceived || []).map((i: any) => ({
            introId: i.intro_id, from: sanitize(i.requested_by), message: sanitize(i.message),
          })),
          matches: {
            total: rawMatches.length,
            surfaceNow: surfaceNow.length,
            queued: queued.length,
            topMatch: surfaceNow[0] ? { name: sanitize(surfaceNow[0].name), score: surfaceNow[0].score, mutual: surfaceNow[0].mutual, why: surfaceNow[0].needMatch || surfaceNow[0].offerMatch } : null,
          },
          networkSize: d.networkSize || 0,
          cardStatus: d.hasCard ? "active" : "none",
          mode: prefs.mode,
          lastChecked: new Date().toISOString(),
        };
      } catch {
        return { pendingIntros: 0, matches: { total: 0, surfaceNow: 0, queued: 0, topMatch: null }, networkSize: 0, cardStatus: "unknown", lastChecked: new Date().toISOString() };
      }
  • withDigest() helper that injects the _digest side-channel into any tool result text.
    function withDigest(resultObj: any, digest: any): string {
      return JSON.stringify({ ...resultObj, _digest: digest }, null, 2);
    }
Behavior3/5

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

No annotations provided, so description carries full burden. It mentions the action is feedback to improve matching, but lacks details on side effects (e.g., visibility, ability to change rating) or required permissions. Adequate for a simple feedback tool.

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?

Two sentences, front-loaded with purpose, no redundant words. Every sentence adds value.

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

Completeness4/5

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

Given no output schema or annotations, the description covers what the tool does, when to use it, and the overall benefit. Missing return value details but not critical for this simple action.

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 description coverage is 100%, so parameter descriptions already exist. The description adds no extra meaning beyond the schema, thus baseline 3.

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?

Clearly states the action (rate a connection) and resource (connection through Mingle), with context on when to use (after intro approved and interaction). Distinguishes from sibling tools like request_intro or respond_to_intro.

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

Usage Guidelines4/5

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

Implicitly provides usage context ('After an intro is approved and you've interacted'), but does not explicitly mention when not to use or alternative tools. Still clear enough for an agent.

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

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