Skip to main content
Glama

search_contact_organisations

Find organizations by name in your contact database to quickly access company information for proposal preparation.

Instructions

Search for organisations by name in the contacts

Input Schema

NameRequiredDescriptionDefault
searchYes

Input Schema (JSON Schema)

{ "properties": { "search": { "type": "string" } }, "required": [ "search" ], "type": "object" }

Implementation Reference

  • The handler function that performs an API GET request to search for organisations by the provided search term, parses the response using the contactOrganisationsListSchema, handles validation errors, and returns the JSON-stringified 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); },
  • Zod schema defining the input parameters for the tool: a required 'search' string.
    const parameters = z.object({ search: z.string(), });
  • Zod schema for the output: an array of organisation schemas, used to validate the API response in the handler.
    export const contactOrganisationsListSchema = z.array(organisationSchema);
  • Import statement bringing in the tool definition for registration.
    import { searchContactOrganisationsTool } from './contacts/search-contact-organisations.js';
  • Registration function that adds the tool (included in the 'tools' array at line 29) 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)); }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/offorte/offorte-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server