Skip to main content
Glama

generate_connect_link

Generate a shareable link that lets external clients connect their social accounts to your workspace. Control link expiry and optionally email the link.

Instructions

Generate a shareable link for external clients to connect their social accounts to the workspace

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
expiryDaysNoLink expiry in days (1-30, default 7)
sendEmailNoSend the link via email
emailNoRecipient email (required if sendEmail is true)

Implementation Reference

  • Handler function for the generate_connect_link tool. Calls POST /social-media/connect-link with expiryDays, sendEmail, and email, and returns the connect URL.
    async (input) => {
      const data = await client.post<{ connectUrl: string }>(
        '/social-media/connect-link',
        {
          expiryDays: input.expiryDays,
          sendEmail: input.sendEmail,
          email: input.email,
        },
      );
    
      return {
        content: [{ type: 'text' as const, text: JSON.stringify(data, null, 2) }],
      };
    },
  • Zod schema defining input validation: expiryDays (int 1-30, default 7), sendEmail (boolean, default false), email (optional email string).
    {
      expiryDays: z
        .number()
        .int()
        .min(1)
        .max(30)
        .default(7)
        .describe('Link expiry in days (1-30, default 7)'),
      sendEmail: z
        .boolean()
        .default(false)
        .describe('Send the link via email'),
      email: z
        .string()
        .email()
        .optional()
        .describe('Recipient email (required if sendEmail is true)'),
    },
  • Registration of the 'generate_connect_link' tool via server.tool() within the registerAccountTools function.
    server.tool(
      'generate_connect_link',
      'Generate a shareable link for external clients to connect their social accounts to the workspace',
      {
        expiryDays: z
          .number()
          .int()
          .min(1)
          .max(30)
          .default(7)
          .describe('Link expiry in days (1-30, default 7)'),
        sendEmail: z
          .boolean()
          .default(false)
          .describe('Send the link via email'),
        email: z
          .string()
          .email()
          .optional()
          .describe('Recipient email (required if sendEmail is true)'),
      },
      async (input) => {
        const data = await client.post<{ connectUrl: string }>(
          '/social-media/connect-link',
          {
            expiryDays: input.expiryDays,
            sendEmail: input.sendEmail,
            email: input.email,
          },
        );
    
        return {
          content: [{ type: 'text' as const, text: JSON.stringify(data, null, 2) }],
        };
      },
    );
  • src/index.ts:18-18 (registration)
    Top-level call to registerAccountTools which registers the generate_connect_link tool on the server.
    registerAccountTools(server, client);
Behavior2/5

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

No annotations are provided, so the description must disclose behavioral traits. It only states the tool generates a link but does not mention whether this action is destructive (e.g., invalidates previous links), requires specific permissions, or has rate limits. The safety profile is unclear.

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 a single sentence with no extraneous words. It is front-loaded with the purpose and immediately understandable. Every part contributes meaning.

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

Completeness3/5

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

Given no annotations and no output schema, the description is adequate for a simple link generation tool. However, it lacks information about the generated link (e.g., expiration, access scope) and usage context. The agent might need more detail to handle edge cases.

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%, so the description does not add much beyond what the schema already provides. The description could have explained the relationship between sendEmail and email, but the schema already indicates email is required when sendEmail is true. The baseline of 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 action 'Generate', the output 'shareable link', and the purpose 'for external clients to connect their social accounts to the workspace'. It is distinct from sibling tools like create_posts or list_accounts, which handle different resources.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It does not mention prerequisites, typical scenarios, or cases where other tools might be more appropriate. Sibling tools like list_accounts or create_posts have different purposes, but the description does not help the agent decide.

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/peturgeorgievv-factory/postfast-mcp'

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