UNPKG

@chinchillaenterprises/mcp-upwork

Version:

Modular Upwork MCP server for job search and proposal management via Upwork API

38 lines 1.23 kB
import { GetJobDetailsArgsSchema } from "../../schemas/upwork.js"; export const getJobDetailsToolDefinition = { name: "upwork_get_job_details", description: "Get detailed information about a specific job", inputSchema: { type: "object", properties: { job_id: { type: "string", description: "Upwork job ID" } }, required: ["job_id"] } }; export async function getJobDetailsHandler(args, upworkClient) { const validatedArgs = GetJobDetailsArgsSchema.parse(args); try { const response = await upworkClient.getClient().get(`/profiles/v1/jobs/${validatedArgs.job_id}`); return { content: [ { type: "text", text: JSON.stringify({ success: true, job: response.data.job || response.data }, null, 2) } ] }; } catch (error) { throw upworkClient.handleError(error); } } export const getJobDetailsTool = { definition: getJobDetailsToolDefinition, handler: getJobDetailsHandler, schema: GetJobDetailsArgsSchema }; //# sourceMappingURL=get-job-details.js.map