Skip to main content
Glama

search_proposals

Find relevant proposals by entering specific search terms to locate documents matching your criteria within the proposal database.

Instructions

Search for proposals by query

Input Schema

NameRequiredDescriptionDefault
searchYes

Input Schema (JSON Schema)

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

Implementation Reference

  • The main handler function for the 'search_proposals' tool. It fetches proposals from the API using the search query, validates the response with proposalsListSchema, and returns the JSON string of the parsed data.
    async execute({ search }) { const result = await get(`/proposals/open/?query=${encodeURIComponent(search)}`); const parsed = proposalsListSchema.safeParse(result); if (!parsed.success) { throwApiInvalidResponseError(parsed.error); } return JSON.stringify(parsed.data); },
  • Input schema definition for the tool using Zod: requires a 'search' string parameter.
    const parameters = z.object({ search: z.string(), });
  • The searchProposalsTool is added to the tools array for registration.
    searchProposalsTool,
  • The registerTools function that adds all tools, including searchProposalsTool, 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)); }
  • Import of the output schema used for parsing the API response.
    import { proposalsListSchema } from '../../schemas/proposals.js';

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