Skip to main content
Glama

connect_destination

Read-only

Connect GitHub, Jira, or Linear to IdeaLift for ticket creation and management. Authorize integration to enable destination linking.

Instructions

Connect a ticket destination (GitHub, Jira, or Linear) to IdeaLift.

USE this tool when:

  • User explicitly says "connect GitHub", "link my Jira", "add Linear"

  • User tried to create a ticket but the destination isn't connected

  • list_destinations showed no integrations and user wants to add one

DO NOT use this tool when:

  • User is just exploring ideas (no connection needed)

  • User hasn't expressed intent to connect anything

  • User is asking ABOUT integrations (use list_destinations instead)

Returns a link the user clicks to authorize. Connection takes ~30 seconds.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
destinationYesWhich service to connect

Implementation Reference

  • The main handler function for the `connect_destination` tool. It validates input, constructs an OAuth connection URL with context, and returns instructions.
    export async function handleConnectDestination(
      args: Record<string, unknown>,
      chatgptSubjectId?: string
    ): Promise<{ structuredContent: ConnectDestinationResult; content: string }> {
      const input = ConnectDestinationInput.parse(args);
      const idealiftUrl = process.env.IDEALIFT_APP_URL || 'https://idealift.app';
    
      // Build OAuth initiation URL that includes ChatGPT context
      const returnContext = chatgptSubjectId ? `?chatgpt_subject=${encodeURIComponent(chatgptSubjectId)}` : '';
    
      const destinationConfig = {
        github: {
          name: 'GitHub',
          path: '/api/github/connect',
          instructions: 'Click the link to authorize GitHub access. Select which repositories IdeaLift can create issues in, then return here.',
        },
        jira: {
          name: 'Jira',
          path: '/api/jira/connect',
          instructions: 'Click the link to connect your Atlassian account. Select your Jira site and projects, then return here.',
        },
        linear: {
          name: 'Linear',
          path: '/api/linear/connect',
          instructions: 'Click the link to authorize Linear access. IdeaLift will be able to create issues in your Linear workspace.',
        },
      };
    
      const config = destinationConfig[input.destination];
      const connectUrl = `${idealiftUrl}${config.path}${returnContext}`;
    
      const result: ConnectDestinationResult = {
        destination: input.destination,
        connectUrl,
        instructions: config.instructions,
      };
    
      return {
        structuredContent: result,
        content: `## Connect ${config.name}
    
    ${config.instructions}
    
    **[Click here to connect ${config.name}](${connectUrl})**
    
    Once connected, come back here and I'll help you create your first ticket!`,
      };
    }
  • Input validation schema for the `connect_destination` tool.
    const ConnectDestinationInput = z.object({
      destination: z.enum(['github', 'jira', 'linear']),
    });
  • The tool registration object for `connect_destination`, defining its name, schema, and metadata for the MCP protocol.
    export const connectDestinationTool = {
      name: 'connect_destination',
      description: `Connect a ticket destination (GitHub, Jira, or Linear) to IdeaLift.
    
    USE this tool when:
    - User explicitly says "connect GitHub", "link my Jira", "add Linear"
    - User tried to create a ticket but the destination isn't connected
    - list_destinations showed no integrations and user wants to add one
    
    DO NOT use this tool when:
    - User is just exploring ideas (no connection needed)
    - User hasn't expressed intent to connect anything
    - User is asking ABOUT integrations (use list_destinations instead)
    
    Returns a link the user clicks to authorize. Connection takes ~30 seconds.`,
      inputSchema: {
        type: 'object' as const,
        properties: {
          destination: {
            type: 'string',
            enum: ['github', 'jira', 'linear'],
            description: 'Which service to connect',
          },
        },
        required: ['destination'],
      },
      annotations: {
        readOnlyHint: true,     // Only generates a URL string for user to click - no database or API writes
        destructiveHint: false, // Pure URL generation, no side effects
        openWorldHint: false,   // No external HTTP calls - just builds a URL from environment variables
      },
      _meta: {
        'openai/visibility': 'public',
      },
    };
Behavior4/5

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

Annotations establish read-only/non-destructive safety. Description adds crucial UX context: returns an authorization link (not immediate connection), requires user click-through, and provides time estimate (~30 seconds). Explains the indirect nature of the connection flow.

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?

Perfectly structured with clear sections: purpose declaration, positive conditions, negative conditions, and return behavior. Every sentence earns its place; no redundancy while covering all necessary guidance.

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?

For a single-parameter tool with complete schema and no output schema, the description fully explains the return behavior (authorization link) and user experience (click to authorize, ~30s duration). Could optionally mention error handling for invalid destinations, but adequately complete.

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 has 100% coverage with clear enum values (github, jira, linear) and description 'Which service to connect'. Description mentions the specific services in prose, reinforcing the schema but not adding distinct validation rules or format details beyond the structured definition.

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?

Specific verb 'Connect' paired with resource 'ticket destination' and explicit examples (GitHub, Jira, Linear). Clearly distinguishes from sibling 'list_destinations' (which only lists) and 'create_ticket' (which creates tickets within destinations).

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

Usage Guidelines5/5

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

Exceptional explicit guidance with 'USE this tool when' and 'DO NOT use this tool when' sections. Names specific sibling 'list_destinations' as the correct alternative for exploration queries, creating clear decision boundaries for the 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/Startvest-LLC/idealift-mcp-server'

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