Skip to main content
Glama
Linked-API
by Linked-API

admin_connect_account

Connect a new LinkedIn account by creating a connection session that returns a session ID and browser link for authentication.

Instructions

Create a connection session to connect a new LinkedIn account. Returns a sessionId and connectionLink that must be opened in a browser.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Main tool implementation: AdminConnectAccountTool class with execute() method that calls admin.accounts.createConnectionSession(). The execute method takes a LinkedApiAdmin instance (no user params) and returns a connection session result.
    import { LinkedApiAdmin, TCreateConnectionSessionResult } from '@linkedapi/node';
    import { Tool } from '@modelcontextprotocol/sdk/types.js';
    import z from 'zod';
    
    import { AdminTool } from '../utils/admin-tool.js';
    
    export class AdminConnectAccountTool extends AdminTool<
      Record<string, never>,
      TCreateConnectionSessionResult
    > {
      public readonly name = 'admin_connect_account';
      protected readonly schema = z.object({});
    
      public override async execute({
        admin,
      }: {
        admin: LinkedApiAdmin;
        args: Record<string, never>;
      }): Promise<TCreateConnectionSessionResult> {
        return await admin.accounts.createConnectionSession();
      }
    
      public override getTool(): Tool {
        return {
          name: this.name,
          description:
            'Create a connection session to connect a new LinkedIn account. Returns a sessionId and connectionLink that must be opened in a browser.',
          inputSchema: {
            type: 'object',
            properties: {},
          },
        };
      }
    }
  • Input schema: empty Zod object (z.object({})) indicating no parameters are required for this tool.
    protected readonly schema = z.object({});
  • Tool registration: AdminConnectAccountTool is instantiated (line 85) in the adminTools array of LinkedApiTools class (lines 80-91).
    this.adminTools = [
      new AdminGetSubscriptionStatusTool(),
      new AdminGetSeatsTool(),
      new AdminSetSeatsTool(),
      new AdminGetAccountsTool(),
      new AdminConnectAccountTool(),
      new AdminDisconnectAccountTool(),
      new AdminRegenerateTokenTool(),
      new AdminGetLimitsUsageTool(),
      new AdminSetLimitsTool(),
      new AdminResetLimitsTool(),
    ];
  • Lookup mechanism: adminToolByName() method (line 98-100) enables resolving tools by name, including 'admin_connect_account'.
      public adminToolByName(name: string): AdminTool<unknown, unknown> | undefined {
        return this.adminTools.find((tool) => tool.name === name);
      }
    }
  • Base class AdminTool that AdminConnectAccountTool extends. Defines the abstract contract with name, schema, validate(), execute(), and getTool() methods.
    import { LinkedApiAdmin } from '@linkedapi/node';
    import { Tool } from '@modelcontextprotocol/sdk/types.js';
    import z from 'zod';
    
    export abstract class AdminTool<TParams, TResult> {
      public abstract readonly name: string;
      protected abstract readonly schema: z.ZodSchema;
    
      public abstract getTool(): Tool;
    
      public validate(args: unknown): TParams {
        return this.schema.parse(args) as TParams;
      }
    
      public abstract execute({
        admin,
        args,
      }: {
        admin: LinkedApiAdmin;
        args: TParams;
      }): Promise<TResult>;
    }
Behavior4/5

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

With no annotations, the description discloses a key behavioral trait: the session requires opening a browser link. This is useful for the agent to understand the non-automated step.

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 efficient sentences: first states purpose and returns, second adds a critical usage note. No wasted words.

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

Completeness5/5

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

Given the tool has no parameters or output schema, the description fully covers purpose, return values, and a key behavioral requirement (browser step). It is complete for a simple tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has zero parameters, and schema coverage is 100%. Baseline for 0 parameters is 4, and the description adds no param info since none exist.

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 verb 'Create' and the resource 'connection session to connect a new LinkedIn account'. It also specifies the return value, distinguishing it from sibling tools like admin_disconnect_account.

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

Usage Guidelines3/5

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

The description implies usage for adding a new account but lacks explicit guidance on when or when not to use this tool, nor does it mention alternatives.

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/Linked-API/linkedapi-mcp'

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