Skip to main content
Glama
ertiqah
by ertiqah

set_linkedin_url

Set the LinkedIn profile URL for analysis. Required before using profile or posts retrieval tools if not set previously.

Instructions

Set or update the LinkedIn profile URL to analyze. Required before using profile/posts retrieval tools if not set previously.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
linkedin_urlYesThe full LinkedIn profile URL (e.g., https://www.linkedin.com/in/username/)

Implementation Reference

  • cli.js:1360-1373 (registration)
    Tool registration for set_linkedin_url in the tools/list response, defining name, description, and inputSchema with required linkedin_url parameter.
    {
        name: "set_linkedin_url",
        description: "Set or update the LinkedIn profile URL to analyze. Required before using profile/posts retrieval tools if not set previously.",
        inputSchema: {
            type: "object",
            properties: {
                linkedin_url: {
                    type: "string",
                    description: "The full LinkedIn profile URL (e.g., https://www.linkedin.com/in/username/)"
                }
            },
            required: ["linkedin_url"]
        }
    },
  • cli.js:931-1021 (handler)
    Handler implementation for set_linkedin_url. Validates API key and linkedin_url argument, then calls backend API at backendLinkedinSetUrlApiUrl (https://ligosocial.com/api/mcp/linkedin/set-url) with the provided URL. Returns success message or error.
    } else if (name === 'set_linkedin_url') {
        console.error(`${packageName}: Received call for set_linkedin_url tool.`);
        const apiKey = process.env.LINKEDIN_MCP_API_KEY;
        const linkedinUrl = args?.linkedin_url;
    
        if (!apiKey) {
            sendResponse({ jsonrpc: "2.0", error: { code: -32001, message: "Server Configuration Error: API Key not set." }, id });
            return;
        }
        if (typeof linkedinUrl !== 'string' || linkedinUrl.trim() === '') {
            sendResponse({ jsonrpc: "2.0", error: { code: -32602, message: "Invalid arguments: 'linkedin_url' (string) required." }, id });
            return;
        }
    
        try {
            const headers = { "Authorization": `Bearer ${apiKey}`, "Content-Type": "application/json", "Accept": "application/json" };
            const payload = { linkedin_url: linkedinUrl };
            console.error(`${packageName}: Calling set LinkedIn URL API: ${backendLinkedinSetUrlApiUrl} with payload:`, JSON.stringify(payload, null, 2));
            const apiResponse = await axios.post(backendLinkedinSetUrlApiUrl, payload, { headers, timeout: 60000 });
            console.error(`${packageName}: Set LinkedIn URL API response status: ${apiResponse.status}`);
            console.error(`${packageName}: Set LinkedIn URL API response data:`, JSON.stringify(apiResponse.data, null, 2));
    
            if (apiResponse.data && apiResponse.data.success) {
                sendResponse({ 
                  jsonrpc: "2.0", 
                  result: { 
                    content: [
                      {
                        type: "text",
                        text: apiResponse.data.message || "Successfully set LinkedIn URL."
                      }
                    ],
                    isError: false
                  }, 
                  id 
                });
            } else {
                const errorMessage = apiResponse.data?.error || "Backend API Error (no detail)";
                console.error(`${packageName}: Set LinkedIn URL API Error: ${errorMessage}`);
                sendResponse({ 
                  jsonrpc: "2.0", 
                  result: {
                    content: [
                      {
                        type: "text",
                        text: `Failed to set LinkedIn URL: ${errorMessage}. Please ensure the URL is a valid LinkedIn profile URL (e.g., https://www.linkedin.com/in/username/).`
                      }
                    ],
                    isError: true
                  }, 
                  id 
                });
            }
    
        } catch (error) {
            let errorMessage = `Failed to call set LinkedIn URL API: ${error.message}`;
            if (error.response) {
                // Extract complete error details from the response
                const responseData = error.response.data || {};
                const extractedError = responseData.error || 
                                      responseData.message ||
                                      (typeof responseData === 'string' ? responseData : null);
                
                // Use the backend's full error message
                if (extractedError) {
                    errorMessage = extractedError;
                } else {
                    // Fallback with a generic message but including the status
                    errorMessage = `Backend API Error (Status ${error.response.status}): Unknown error`;
                }
                
                console.error(`${packageName}: Set LinkedIn URL API Error Response:`, error.response.data); 
            } else if (error.request) {
                errorMessage = "No response received from set LinkedIn URL API. The server may be unavailable or experiencing issues.";
            }
            console.error(`${packageName}: ${errorMessage}`);
            
            sendResponse({ 
              jsonrpc: "2.0", 
              result: { 
                content: [
                  {
                    type: "text",
                    text: `Failed to set LinkedIn URL: ${errorMessage}`
                  }
                ],
                isError: true
              }, 
              id 
            });
        }
  • Input schema for set_linkedin_url: requires a single 'linkedin_url' string property (the full LinkedIn profile URL, e.g., https://www.linkedin.com/in/username/).
    inputSchema: {
        type: "object",
        properties: {
            linkedin_url: {
                type: "string",
                description: "The full LinkedIn profile URL (e.g., https://www.linkedin.com/in/username/)"
            }
        },
        required: ["linkedin_url"]
    }
  • cli.js:18-18 (helper)
    Backend API URL constant: backendLinkedinSetUrlApiUrl pointing to https://ligosocial.com/api/mcp/linkedin/set-url used by the set_linkedin_url handler.
    const backendLinkedinSetUrlApiUrl = 'https://ligosocial.com/api/mcp/linkedin/set-url';
Behavior2/5

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

No annotations are provided, so the description carries full burden. It only says 'Set or update' but does not disclose effects like overwriting behavior or persistence, leaving behavioral uncertainty.

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 verb+resource, no filler words. Every sentence serves a purpose.

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 simple setter tool with one parameter and no output schema, the description adequately explains its role as a prerequisite. It could mention return behavior but is mostly 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 description coverage is 100% with the parameter already well-described. The tool description adds no additional semantics beyond what the schema 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 verb 'Set or update' and the resource 'LinkedIn profile URL', and it distinguishes itself from sibling tools by being a prerequisite for profile/posts retrieval tools.

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?

The description explicitly states when to use: 'Required before using profile/posts retrieval tools if not set previously'. It provides clear usage context but does not explicitly mention when not to use or 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/ertiqah/linkedin-mcp-runner'

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