get-funding-options
Find available grants and funding opportunities with eligibility criteria and application details to support your project financing needs.
Instructions
Retrieve available funding opportunities with detailed information including name and description. Use this tool when users need to explore available grants, funds, or financing opportunities. The results include program names, descriptions, eligibility criteria, and application details.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | Yes | ||
| page | Yes |
Implementation Reference
- src/tools/get-funding-options.ts:20-37 (handler)Handler function that executes the tool logic by querying FluentLab API and returning JSON results.handler: async (params) => { const fundingOptions = await fluentLab.fundingOption.getFundingOptions(params); if (fundingOptions.isOk()) { return { content: [ { type: 'text', text: JSON.stringify(fundingOptions.value, null, 2), mimeType: "application/json" } ] }; } else { // Error handling is now done by middleware, just throw the original error throw fundingOptions.error; } }
- Zod schema defining the input parameters for the getFundingOptions tool (limit and page).export const FundingOptionQuerySchema = z.object({ limit: z.number().int().positive().min(1).max(100), page: z.number().int().positive().min(1), });
- Helper method in FundingOption class that performs the actual API request to retrieve funding options from FluentLab.async getFundingOptions(query: TFundingOptionQuery): Promise<ResultAsync<TFundingOptionPage, TApiError>> { try { const res = await this.axiosInstance.get('mcp/funding-options', { params: query }); return ok(res.data); } catch (error: unknown) { if (error instanceof AxiosError) { if (error.response?.status === 401) return err({ type: 'API_UNAUTHORIZED_ERROR', error, }) return err({ type: 'AXIOS_ERROR', error, }) } return err({ type: 'UNKNOWN_ERROR', error, }) } }
- src/tools/index.ts:5-7 (registration)Registration of the getFundingOptionsTool in the central tool registry using its name.export const toolRegistry: ToolRegistry = { [getFundingOptionsTool.definition.name]: getFundingOptionsTool, };