Skip to main content
Glama
melaodoidao

Data.gov MCP Server

by melaodoidao

package_show

Retrieve detailed information about a specific dataset by entering its ID or name on the Data.gov MCP Server.

Instructions

Get details for a specific package (dataset)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesPackage ID or name

Implementation Reference

  • The main handler function for the package_show tool. It performs an HTTP GET request to the Data.gov API endpoint '/action/package_show' using the provided package ID and returns the response as formatted JSON text content.
    private async packageShow(args: PackageShowArgs) {
      try {
        const response = await this.axiosInstance.get('/action/package_show', {
          params: { id: args.id },
        });
        return {
          content: [
            { type: 'text', text: JSON.stringify(response.data, null, 2) },
          ],
        };
      } catch (error) {
        return this.handleAxiosError(error);
      }
    }
  • TypeScript interface defining the input arguments for package_show (requiring 'id' string) and the corresponding validation function isValidPackageShowArgs.
     * Arguments for the package_show tool.
     */
    interface PackageShowArgs {
      id: string;
    }
    
    /**
     * Checks if the given arguments are valid for the package_show tool.
     * @param args The arguments to validate.
     * @returns True if the arguments are valid, false otherwise.
     */
    const isValidPackageShowArgs = (args: any): args is PackageShowArgs =>
      typeof args === 'object' && args !== null && typeof args.id === 'string';
  • src/index.ts:221-230 (registration)
    Tool registration in the ListToolsRequestSchema response, defining the name, description, and input schema (object with required 'id' string).
      name: 'package_show',
      description: 'Get details for a specific package (dataset)',
      inputSchema: {
        type: 'object',
        properties: {
          id: { type: 'string', description: 'Package ID or name' },
        },
        required: ['id'],
      },
    },
  • src/index.ts:271-278 (registration)
    Dispatch handler in the CallToolRequestSchema switch statement that validates the arguments using isValidPackageShowArgs and invokes the packageShow method.
    case 'package_show':
      if (!isValidPackageShowArgs(request.params.arguments)) {
        throw new McpError(
          ErrorCode.InvalidParams,
          'Invalid package_show arguments'
        );
      }
      return this.packageShow(request.params.arguments);
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states this is a 'Get' operation, implying it's likely read-only, but doesn't confirm safety aspects like whether it requires authentication, has rate limits, or what happens if the package doesn't exist. More context is needed for a mutation-aware agent.

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 without any wasted words. It's appropriately sized for a simple tool with one parameter, making it easy to parse quickly.

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

Completeness3/5

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

Given the tool's low complexity (one parameter, no output schema, no annotations), the description is minimally adequate. It covers the basic purpose but lacks details on usage context, behavioral traits, or output format, which could hinder an agent in more complex scenarios.

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 schema description coverage is 100%, with the 'id' parameter fully documented in the schema. The description adds no additional parameter details beyond implying the tool fetches details for a package, which aligns with the schema. This meets the baseline for high schema coverage.

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 with a specific verb ('Get details') and resource ('package (dataset)'), making it immediately understandable. It doesn't explicitly differentiate from sibling tools like 'package_search' or 'group_list', which prevents a perfect score.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives like 'package_search' or 'group_list'. It lacks context about prerequisites, such as needing a specific package ID, and doesn't mention any exclusions or complementary tools.

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

Related 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/melaodoidao/datagov-mcp-server'

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