Skip to main content
Glama
ertiqah
by ertiqah

refresh_linkedin_profile

Update LinkedIn profile data to reflect recent changes and ensure information is current.

Instructions

Force a refresh of the LinkedIn profile data to update any recent changes.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The MCP tool handler for 'refresh_linkedin_profile'. Checks API key, calls backend API to refresh profile data, handles response and errors, sends JSON-RPC result.
    } else if (name === 'refresh_linkedin_profile') {
        console.error(`${packageName}: Received call for refresh_linkedin_profile tool.`);
        const apiKey = process.env.LINKEDIN_MCP_API_KEY;
    
        if (!apiKey) {
            sendResponse({ jsonrpc: "2.0", error: { code: -32001, message: "Server Configuration Error: API Key not set." }, id });
            return;
        }
    
        try {
            const headers = { "Authorization": `Bearer ${apiKey}`, "Content-Type": "application/json", "Accept": "application/json" };
            console.error(`${packageName}: Calling refresh LinkedIn profile API: ${backendLinkedinRefreshProfileApiUrl}`);
            const apiResponse = await axios.post(backendLinkedinRefreshProfileApiUrl, {}, { headers, timeout: 60000 });
            console.error(`${packageName}: Refresh LinkedIn profile API response status: ${apiResponse.status}`);
            console.error(`${packageName}: Refresh LinkedIn profile 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 refreshed LinkedIn profile data."
                      }
                    ],
                    isError: false
                  }, 
                  id 
                });
            } else {
                const errorMessage = apiResponse.data?.error || "Backend API Error (no detail)";
                console.error(`${packageName}: Refresh LinkedIn profile API Error: ${errorMessage}`);
                sendResponse({ 
                  jsonrpc: "2.0", 
                  result: {
                    content: [
                      {
                        type: "text",
                        text: `Failed to refresh LinkedIn profile: ${errorMessage}`
                      }
                    ],
                    isError: true
                  }, 
                  id 
                });
            }
    
        } catch (error) {
            let errorMessage = `Failed to call refresh LinkedIn profile 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}: Refresh LinkedIn profile API Error Response:`, error.response.data); 
            } else if (error.request) {
                errorMessage = "No response received from refresh LinkedIn profile API.";
            }
            console.error(`${packageName}: ${errorMessage}`);
            
            sendResponse({ 
              jsonrpc: "2.0", 
              result: { 
                content: [
                  {
                    type: "text",
                    text: `Failed to refresh LinkedIn profile: ${errorMessage}`
                  }
                ],
                isError: true
              }, 
              id 
            });
        }
  • cli.js:1356-1362 (registration)
    Registration of the 'refresh_linkedin_profile' tool in the MCP 'tools/list' response, defining name, description, and empty input schema (no parameters required).
        name: "refresh_linkedin_profile",
        description: "Force a refresh of the LinkedIn profile data to update any recent changes.",
        inputSchema: {
            type: "object",
            properties: {}
        }
    },
  • cli.js:19-19 (helper)
    Constant defining the backend API endpoint URL used by the refresh_linkedin_profile handler.
    const backendLinkedinRefreshProfileApiUrl = 'https://ligo.ertiqah.com/api/mcp/linkedin/refresh-profile';
  • Input schema for refresh_linkedin_profile tool: empty object (no input parameters required).
        type: "object",
        properties: {}
    }
Behavior2/5

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

With no annotations provided, the description carries the full burden. It mentions 'force a refresh' which implies a mutation operation, but doesn't disclose behavioral traits like whether it requires authentication, rate limits, what 'force' entails (e.g., immediate vs. queued), or potential side effects. This leaves significant gaps for a tool that likely interacts with external APIs.

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, efficient sentence that front-loads the key action ('force a refresh') and purpose ('to update any recent changes'). There is no wasted language, making it highly concise and well-structured for quick understanding.

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

Completeness2/5

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

Given the complexity of refreshing external profile data, no annotations, and no output schema, the description is incomplete. It lacks details on what the refresh entails (e.g., data sources, latency), what happens on success/failure, or what the agent should expect, leaving the agent with insufficient context for reliable use.

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 tool has 0 parameters with 100% schema coverage, so the input schema fully documents the absence of parameters. The description doesn't need to add parameter details, and it appropriately doesn't mention any, earning a baseline score of 4 for not introducing confusion.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose with a specific verb ('force a refresh') and resource ('LinkedIn profile data'), and distinguishes it from siblings like 'get_linkedin_profile' by emphasizing updating recent changes. However, it doesn't explicitly differentiate from 'refresh_linkedin_posts', which might cause ambiguity.

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 when 'to update any recent changes' is needed, suggesting it should be used after profile modifications. However, it lacks explicit guidance on when to use this versus 'get_linkedin_profile' or 'refresh_linkedin_posts', and no alternatives or exclusions are mentioned.

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