Skip to main content
Glama

publish_intent_card

Publish your intent card to the Mingle network—specify your needs and offers—and receive top matches instantly.

Instructions

Publish your profile to the Mingle network — what you're looking for and what you can offer. Cards are Ed25519 signed with your persistent identity and expire after 48h. Returns your top matches immediately.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesYour name or alias
topicNoWhat you're working on (short summary)
needsNoWhat you're looking for (plain text list)
offersNoWhat you can provide (plain text list)
contextNoRich context for better matching (private — never shown to others)
open_toNoOpen to (e.g. 'introductions', 'partnerships')
hoursNoHours until card expires (default 48)

Implementation Reference

  • The async handler function that executes the publish_intent_card tool logic: validates inputs, builds card payload, signs with Ed25519, POSTs to /api/cards, caches locally, fetches digest, and returns top matches.
      async (args) => {
        const MAX_FIELD_LEN = 200;
        const MAX_ITEMS = 5;
        if (args.name.length > 100) return { content: [{ type: "text" as const, text: "Name too long (max 100 chars)" }], isError: true };
        if ((args.needs?.length || 0) > MAX_ITEMS) return { content: [{ type: "text" as const, text: `Too many needs (max ${MAX_ITEMS})` }], isError: true };
        if ((args.offers?.length || 0) > MAX_ITEMS) return { content: [{ type: "text" as const, text: `Too many offers (max ${MAX_ITEMS})` }], isError: true };
        for (const item of [...(args.needs || []), ...(args.offers || [])]) {
          if (item.length > MAX_FIELD_LEN) return { content: [{ type: "text" as const, text: `Item too long (max ${MAX_FIELD_LEN} chars)` }], isError: true };
        }
        if (args.context && args.context.length > 1000) return { content: [{ type: "text" as const, text: "Context too long (max 1000 chars)" }], isError: true };
    
        // Build card manually (not via createIntentCard) so signature covers all fields
        const card: Record<string, any> = {
          cardId: `card-${agentId}-${Date.now()}`,
          agentId,
          publicKey: keys.publicKey,
          principalAlias: args.name,
          topic: args.topic || "",
          needs: (args.needs || []).map(desc => ({ description: desc, category: "general" })),
          offers: (args.offers || []).map(desc => ({ description: desc, category: "general" })),
          openTo: args.open_to || ["introductions", "collaboration"],
          context: args.context || "",
          provenance: "explicit",
          confidence: 1.0,
          source: "organic",
          expiresAt: new Date(Date.now() + (args.hours || 48) * 3600 * 1000).toISOString(),
          createdAt: new Date().toISOString(),
        };
    
        // Sign the full card (API strips signature, canonicalizes rest, verifies)
        card.signature = sign(canonicalize(card), keys.privateKey);
    
        try {
          const result = await api("/api/cards", { method: "POST", body: JSON.stringify(card) });
          if (result.error) return { content: [{ type: "text" as const, text: `Failed: ${result.error}` }], isError: true };
    
          // Cache card locally for offline resilience
          cacheCard({ cardId: result.cardId, topic: args.topic, needs: args.needs, offers: args.offers, expiresAt: result.expiresAt });
    
          const digest = await fetchDigest();
    
          return {
            content: [{
              type: "text" as const,
              text: withDigest({
                published: true,
                cardId: result.cardId,
                name: args.name,
                topic: args.topic,
                needs: (args.needs || []).length,
                offers: (args.offers || []).length,
                expiresAt: result.expiresAt,
                networkSize: result.networkSize,
                topMatches: classifyMatches(result.topMatches || [], prefs.mode).slice(0, 3).map((m: any) => ({
                  name: sanitize(m.name || m.agentId),
                  score: m.score,
                  mutual: m.mutual,
                  confidence: m.confidence,
                  surfacing: m.surfacing,
                  needMatch: sanitize(m.needMatch),
                  offerMatch: sanitize(m.offerMatch),
                })),
                matchingVersion: result.matchingVersion || "semantic-v1",
              }, digest),
            }],
          };
        } catch (e: any) {
          return { content: [{ type: "text" as const, text: `Network error: ${e.message}` }], isError: true };
        }
      }
    );
  • Zod schema definitions for publish_intent_card inputs: name (string), topic (optional), needs (optional string array), offers (optional string array), context (optional string), open_to (optional string array), hours (number, default 48).
    {
      name: z.string().describe("Your name or alias"),
      topic: z.string().optional().describe("What you're working on (short summary)"),
      needs: z.array(z.string()).optional().describe("What you're looking for (plain text list)"),
      offers: z.array(z.string()).optional().describe("What you can provide (plain text list)"),
      context: z.string().optional().describe("Rich context for better matching (private — never shown to others)"),
      open_to: z.array(z.string()).optional().describe("Open to (e.g. 'introductions', 'partnerships')"),
      hours: z.number().default(48).describe("Hours until card expires (default 48)"),
    },
  • src/index.ts:98-180 (registration)
    Registration of the 'publish_intent_card' tool on the MCP server via server.tool() with name, description, schema, and handler.
    server.tool(
      "publish_intent_card",
      "Publish your profile to the Mingle network — what you're looking for and what you can offer. Cards are Ed25519 signed with your persistent identity and expire after 48h. Returns your top matches immediately.",
      {
        name: z.string().describe("Your name or alias"),
        topic: z.string().optional().describe("What you're working on (short summary)"),
        needs: z.array(z.string()).optional().describe("What you're looking for (plain text list)"),
        offers: z.array(z.string()).optional().describe("What you can provide (plain text list)"),
        context: z.string().optional().describe("Rich context for better matching (private — never shown to others)"),
        open_to: z.array(z.string()).optional().describe("Open to (e.g. 'introductions', 'partnerships')"),
        hours: z.number().default(48).describe("Hours until card expires (default 48)"),
      },
      async (args) => {
        const MAX_FIELD_LEN = 200;
        const MAX_ITEMS = 5;
        if (args.name.length > 100) return { content: [{ type: "text" as const, text: "Name too long (max 100 chars)" }], isError: true };
        if ((args.needs?.length || 0) > MAX_ITEMS) return { content: [{ type: "text" as const, text: `Too many needs (max ${MAX_ITEMS})` }], isError: true };
        if ((args.offers?.length || 0) > MAX_ITEMS) return { content: [{ type: "text" as const, text: `Too many offers (max ${MAX_ITEMS})` }], isError: true };
        for (const item of [...(args.needs || []), ...(args.offers || [])]) {
          if (item.length > MAX_FIELD_LEN) return { content: [{ type: "text" as const, text: `Item too long (max ${MAX_FIELD_LEN} chars)` }], isError: true };
        }
        if (args.context && args.context.length > 1000) return { content: [{ type: "text" as const, text: "Context too long (max 1000 chars)" }], isError: true };
    
        // Build card manually (not via createIntentCard) so signature covers all fields
        const card: Record<string, any> = {
          cardId: `card-${agentId}-${Date.now()}`,
          agentId,
          publicKey: keys.publicKey,
          principalAlias: args.name,
          topic: args.topic || "",
          needs: (args.needs || []).map(desc => ({ description: desc, category: "general" })),
          offers: (args.offers || []).map(desc => ({ description: desc, category: "general" })),
          openTo: args.open_to || ["introductions", "collaboration"],
          context: args.context || "",
          provenance: "explicit",
          confidence: 1.0,
          source: "organic",
          expiresAt: new Date(Date.now() + (args.hours || 48) * 3600 * 1000).toISOString(),
          createdAt: new Date().toISOString(),
        };
    
        // Sign the full card (API strips signature, canonicalizes rest, verifies)
        card.signature = sign(canonicalize(card), keys.privateKey);
    
        try {
          const result = await api("/api/cards", { method: "POST", body: JSON.stringify(card) });
          if (result.error) return { content: [{ type: "text" as const, text: `Failed: ${result.error}` }], isError: true };
    
          // Cache card locally for offline resilience
          cacheCard({ cardId: result.cardId, topic: args.topic, needs: args.needs, offers: args.offers, expiresAt: result.expiresAt });
    
          const digest = await fetchDigest();
    
          return {
            content: [{
              type: "text" as const,
              text: withDigest({
                published: true,
                cardId: result.cardId,
                name: args.name,
                topic: args.topic,
                needs: (args.needs || []).length,
                offers: (args.offers || []).length,
                expiresAt: result.expiresAt,
                networkSize: result.networkSize,
                topMatches: classifyMatches(result.topMatches || [], prefs.mode).slice(0, 3).map((m: any) => ({
                  name: sanitize(m.name || m.agentId),
                  score: m.score,
                  mutual: m.mutual,
                  confidence: m.confidence,
                  surfacing: m.surfacing,
                  needMatch: sanitize(m.needMatch),
                  offerMatch: sanitize(m.offerMatch),
                })),
                matchingVersion: result.matchingVersion || "semantic-v1",
              }, digest),
            }],
          };
        } catch (e: any) {
          return { content: [{ type: "text" as const, text: `Network error: ${e.message}` }], isError: true };
        }
      }
    );
  • cacheCard helper that persists the published card to ~/.mingle/last-card.json for offline resilience.
    export function cacheCard(card: any): void {
      ensureDir();
      writeFileSync(LAST_CARD_PATH, JSON.stringify(card, null, 2));
    }
Behavior4/5

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

With no annotations, the description carries full burden. It discloses key traits: Ed25519 signing, 48h expiry, and immediate match returns. However, it does not explain mutation semantics (e.g., whether publishing overwrites an existing card) or authentication requirements.

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 three sentences, front-loading the main purpose and then adding behavioral details. Every sentence provides value with no redundancy.

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 the tool's complexity (7 params, no output schema, no annotations), the description covers the main behavioral aspects (signing, expiry, immediate matches) and overall purpose. However, it omits details about idempotency, limits, or relationship with sibling tools like remove_intent_card.

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 descriptions for all 7 parameters. The description does not add significant extra meaning beyond what the schema already provides, so baseline 3 is appropriate.

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 clearly states the tool publishes a profile card to the Mingle network. It specifies the verb 'publish' and the resource 'profile card', and distinguishes itself from siblings like search_matches and remove_intent_card by being the creation action.

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?

While the description implies use when wanting to publish an intent card, it does not explicitly contrast with sibling tools or provide when-not guidance. However, the overall purpose is clear enough to guide correct usage.

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