Skip to main content
Glama
tachibanayu24

jgrants-mcp

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: "補助金",
          },
        },
      },
    },
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions the search functionality and default keyword, but doesn't describe key behaviors such as whether this is a read-only operation, how results are returned (e.g., pagination, format), error handling, or any rate limits. For a search tool with zero annotation coverage, this leaves significant gaps in understanding its behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads the core purpose ('Search for subsidies currently accepting applications') and includes essential details (keyword usage and default). There is no wasted text, making it appropriately sized and well-structured for quick comprehension.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (a search function with no output schema and no annotations), the description is incomplete. It lacks information on return values (e.g., what data is included in search results), behavioral traits like pagination or sorting, and how it differs from sibling tools. Without annotations or output schema, the description should provide more context to be fully helpful.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage, with the parameter 'keyword' documented as 'Search keyword' and a default value. The description adds minimal value beyond the schema by restating the default keyword ('補助金') and implying it's used for searching subsidies. Since schema coverage is high, the baseline is 3, and the description doesn't significantly enhance parameter understanding.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Search for subsidies currently accepting applications using the specified keyword.' It specifies the verb ('search'), resource ('subsidies'), and scope ('currently accepting applications'), though it doesn't explicitly differentiate from sibling tools like 'get_subsidy_detail' beyond the search vs. detail distinction. This makes it clear but not fully sibling-differentiated.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage context by specifying 'currently accepting applications' and the default keyword, suggesting it's for finding active subsidies. However, it doesn't explicitly state when to use this tool versus alternatives like 'get_subsidy_detail' (e.g., for detailed info vs. broad search) or provide exclusions. The guidance is present but not comprehensive.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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