search_contact_organisations
Search for contact organizations by name to find relevant business partners or clients in proposal software.
Instructions
Search for organisations by name in the contacts
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| search | Yes |
Implementation Reference
- The main handler function for the 'search_contact_organisations' tool. It performs a GET request to the API endpoint `/contacts/organisations/?query={search}`, parses the response using the contactOrganisationsListSchema, handles parsing errors, and returns the JSON string of the parsed data.async execute({ search }) { const result = await get(`/contacts/organisations/?query=${encodeURIComponent(search)}`); const parsed = contactOrganisationsListSchema.safeParse(result); if (!parsed.success) { throwApiInvalidResponseError(parsed.error); } return JSON.stringify(parsed.data); },
- Input schema (Zod) for the tool, defining a required 'search' string parameter.const parameters = z.object({ search: z.string(), });
- src/schemas/contacts.ts:74-74 (schema)Output schema (Zod) used in the handler to parse the API response into an array of organisation objects.export const contactOrganisationsListSchema = z.array(organisationSchema);
- src/tools/register.ts:37-39 (registration)Tool registration function that adds the searchContactOrganisationsTool (imported at line 11 and included in the 'tools' array at line 29) to the FastMCP server instance.export function registerTools({ server }: { server: FastMCP }) { (tools as unknown as FastMCPTool<Record<string, unknown>, ToolParameters>[]).map(initialContextGuard).forEach((tool) => server.addTool(tool)); }