Skip to main content
Glama

list_subsidies

Search for subsidies currently accepting applications using keywords to find available funding opportunities.

Instructions

Search for subsidies currently accepting applications using the specified keyword. Default is '補助金' (subsidy).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keywordNoSearch keyword補助金

Implementation Reference

  • Handler for the 'list_subsidies' tool. Parses input arguments using ListSubsidiesSchema, constructs API query parameters for searching subsidies, fetches data from the jGrants API, and returns the response as structured content or an error message.
    case "list_subsidies": { const args = ListSubsidiesSchema.parse(request.params.arguments ?? {}); const params = new URLSearchParams({ keyword: args.keyword, sort: "acceptance_end_datetime", order: "ASC", acceptance: "1", }); try { const response = await fetch(`${API_BASE_URL}/subsidies?${params}`); if (!response.ok) { const errorBody = await response.text(); throw new Error(`API error: ${response.status} - ${errorBody}`); } const data = (await response.json()) as SubsidyListResponse; return { content: [ { type: "text", text: JSON.stringify(data, null, 2), }, ], structuredContent: data, }; } catch (error) { return { content: [ { type: "text", text: `Error occurred: ${ error instanceof Error ? error.message : "Unknown error" }`, }, ], }; } }
  • Zod schema defining the input for the 'list_subsidies' tool, with an optional 'keyword' parameter defaulting to '補助金'.
    const ListSubsidiesSchema = z.object({ keyword: z.string().default("補助金"), });
  • index.ts:54-68 (registration)
    Registration of the 'list_subsidies' tool in the ListToolsRequestHandler response, providing name, description, and input schema.
    { name: "list_subsidies", description: "Search for subsidies currently accepting applications using the specified keyword. Default is '補助金' (subsidy).", inputSchema: { type: "object", properties: { keyword: { type: "string", description: "Search keyword", default: "補助金", }, }, }, },

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/tachibanayu24/jgrants-mcp'

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