Skip to main content
Glama
Jing-yilin

LinkedIn MCP Server

by Jing-yilin

get_job

Retrieve LinkedIn job details using job ID or URL, returning cleaned data in TOON format with optional local JSON saving.

Instructions

Get LinkedIn job details. Returns cleaned data in TOON format.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
jobIdNoLinkedIn job ID
urlNoLinkedIn job URL
save_dirNoDirectory to save cleaned JSON data

Implementation Reference

  • The primary handler function for the 'get_job' tool. It processes input arguments (jobId or url), fetches job data from the '/job' API endpoint, cleans the data using DataCleaners.cleanJob, and returns a formatted TOON-encoded response.
    private async getJob(args: Record<string, any>): Promise<CallToolResult> { const params: Record<string, any> = {}; if (args.jobId) params.jobId = args.jobId; if (args.url) params.url = args.url; if (!params.jobId && !params.url) { throw new Error('At least one of jobId or url is required'); } const data = await this.makeRequest('/job', params); const cleaned = DataCleaners.cleanJob(data.element); return this.formatResponse(cleaned, { saveDir: args.save_dir, toolName: 'get_job', }); }
  • src/index.ts:378-390 (registration)
    The tool registration in the ListTools response, defining the name, description, and input schema for 'get_job'.
    { name: 'get_job', description: 'Get LinkedIn job details. Returns cleaned data in TOON format.', inputSchema: { type: 'object', properties: { jobId: { type: 'string', description: 'LinkedIn job ID' }, url: { type: 'string', description: 'LinkedIn job URL' }, save_dir: { type: 'string', description: 'Directory to save cleaned JSON data' }, }, required: [], }, } as Tool,
  • The input schema defining parameters for the 'get_job' tool: jobId, url, and optional save_dir.
    inputSchema: { type: 'object', properties: { jobId: { type: 'string', description: 'LinkedIn job ID' }, url: { type: 'string', description: 'LinkedIn job URL' }, save_dir: { type: 'string', description: 'Directory to save cleaned JSON data' }, }, required: [], },
  • Helper function in DataCleaners that processes and structures raw job data from the API into a clean format used by the handler.
    cleanJob(raw: any): any { if (!raw) return null; return { id: raw.id, title: raw.title, linkedinUrl: raw.linkedinUrl || raw.url, state: raw.jobState, postedDate: raw.postedDate, location: raw.location?.linkedinText, company: raw.company?.name || raw.companyName, companyUrl: raw.company?.linkedinUrl || raw.companyLink, salary: raw.salary?.text || (raw.salary?.min && raw.salary?.max ? `${raw.salary.min}-${raw.salary.max} ${raw.salary.currency || ''}` : null), employmentType: raw.employmentType, workplaceType: raw.workplaceType, easyApply: raw.easyApply, description: raw.descriptionText, }; },

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/Jing-yilin/linkedin-mcp-server'

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