get_contact_details
Retrieve complete contact information using a contact ID to access proposal-related contact details in Offorte Proposal Software.
Instructions
Get all details for a contact by id
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| contact_id | Yes |
Input Schema (JSON Schema)
{
"properties": {
"contact_id": {
"type": "string"
}
},
"required": [
"contact_id"
],
"type": "object"
}
Implementation Reference
- Tool handler definition including input schema (parameters), description, annotations, and execute function that makes API request to fetch contact details, validates with contactDetailsSchema, handles error, and returns JSON string of data.const parameters = z.object({ contact_id: z.string(), }); export const getContactDetailsTool: Tool<typeof parameters._type, typeof parameters> = { name: 'get_contact_details', description: 'Get all details for a contact by id', parameters, annotations: { title: 'Get Contact Details', openWorldHint: true, }, async execute({ contact_id }) { const result = await get(`/contacts/${contact_id}`); const parsed = contactDetailsSchema.safeParse(result); if (!parsed.success) { throwApiInvalidResponseError(parsed.error); } return JSON.stringify(parsed.data); }, };
- src/schemas/contacts.ts:99-110 (schema)Output schema (contactDetailsSchema) for validating the API response containing full contact details.export const contactDetailsSchema = z .object({ id: z.number(), ...addressFields, ...socialFields, ...contactFields, ...organisationFields, people: z.array(personSchema).optional(), proposals: proposalsListSchema.optional(), tags: tagsSchema.optional(), }) .passthrough();
- src/tools/register.ts:19-35 (registration)Registration: getContactDetailsTool is imported and included in the tools array used for server registration.const tools = [ getInitialContextTool, getAccountUsersTool, getAutomationSetsTool, getContactDetailsTool, getDesignTemplatesTool, getEmailTemplatesTool, getProposalDirectoriesTool, getProposalTemplatesTool, getTextTemplatesTool, searchContactOrganisationsTool, searchContactPeopleTool, searchProposalsTool, createContactTool, createProposalTool, sendProposalTool, ];
- src/tools/register.ts:37-39 (registration)Registration: The registerTools function processes the tools array (including getContactDetailsTool) and adds each tool to the FastMCP server.export function registerTools({ server }: { server: FastMCP }) { (tools as unknown as FastMCPTool<Record<string, unknown>, ToolParameters>[]).map(initialContextGuard).forEach((tool) => server.addTool(tool)); }