search_contact_people
Find people by name in Offorte Proposal Software contacts to locate team members or stakeholders for proposal collaboration.
Instructions
Search for people by name in the contacts
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| search | Yes |
Implementation Reference
- Full implementation of the search_contact_people tool, including the name, input parameters schema, annotations, and the execute handler function that queries the API endpoint `/contacts/people/?query={search}`, parses with contactPeopleListSchema, and returns JSON string of results.export const searchContactPeopleTool: Tool<typeof parameters._type, typeof parameters> = { name: 'search_contact_people', description: `Search for people by name in the contacts`, parameters, annotations: { title: 'Search Contact People', openWorldHint: true, }, async execute({ search }) { const result = await get(`/contacts/people/?query=${encodeURIComponent(search)}`); const parsed = contactPeopleListSchema.safeParse(result); if (!parsed.success) { throwApiInvalidResponseError(parsed.error); } return JSON.stringify(parsed.data); }, };
- src/schemas/contacts.ts:76-97 (schema)Zod schemas defining the structure of person or organisation contacts (personOrOrganisationSchema) and the list schema (contactPeopleListSchema) used to validate the API response in the tool handler.const personOrOrganisationSchema = z .object({ id: z.number(), contact_id: optionalId, type: contactType, account_user_id: optionalId, account_user_name: z.string().optional(), organisation: z.string(), date_created: z.string(), proposals_open: z.number().optional(), proposals_won: z.number().optional(), ...addressFields, ...socialFields, ...contactFields, firstname: z.string(), lastname: z.string(), fullname: z.string(), salutation: z.string(), }) .passthrough(); export const contactPeopleListSchema = z.array(personOrOrganisationSchema);
- src/tools/register.ts:37-39 (registration)The registerTools function registers all tools to the FastMCP server instance. The searchContactPeopleTool is imported on line 12 and added to the tools array on line 30.export function registerTools({ server }: { server: FastMCP }) { (tools as unknown as FastMCPTool<Record<string, unknown>, ToolParameters>[]).map(initialContextGuard).forEach((tool) => server.addTool(tool)); }
- src/tools/register.ts:30-30 (registration)Inclusion of searchContactPeopleTool in the array of tools to be registered.searchContactPeopleTool,
- src/tools/register.ts:12-12 (registration)Import of the searchContactPeopleTool for registration.import { searchContactPeopleTool } from './contacts/search-contact-people.js';