@chinchillaenterprises/mcp-upwork
Version:
Modular Upwork MCP server for job search and proposal management via Upwork API
31 lines • 1.08 kB
JavaScript
import { UpworkClient } from "../../services/upwork-client.js";
export const toolDefinition = {
name: "upwork_get_contract_details",
description: "Get detailed information about a specific contract including terms, payments, and milestones",
inputSchema: {
type: "object",
properties: {
contractId: {
type: "string",
description: "The unique identifier of the contract"
}
},
required: ["contractId"]
}
};
export const handler = async (args) => {
try {
const client = UpworkClient.getInstance();
const response = await client.get(`/hr/v2/contracts/${args.contract_id}`);
return {
success: true,
contract: response.contract || response,
contractId: args.contract_id
};
}
catch (error) {
throw new Error(`Failed to get contract details: ${error.message}`);
}
};
export { GetContractDetailsArgsSchema as schema } from "../../schemas/upwork.js";
//# sourceMappingURL=get-contract-details.js.map