Skip to main content
Glama
EdgeworthHitbox

Colorado DWR MCP Server

get_surface_water_ts_day

Retrieve daily surface water time series data for Colorado stations to analyze streamflow patterns and monitor water resources over specified date ranges.

Instructions

Get daily time series data for a surface water station

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
abbrevYesStation abbreviation (e.g., 'PLAPLACO')
startDateYesStart date (MM/DD/YYYY or YYYY-MM-DD)
endDateYesEnd date (MM/DD/YYYY or YYYY-MM-DD)

Implementation Reference

  • Handler for the get_surface_water_ts_day tool. Extracts input arguments (abbrev, startDate, endDate), maps them to API parameters (abbrev, min-measDate, max-measDate), and delegates to handleApiCall to fetch daily time series data from the DWR surfacewatertsday endpoint.
    case "get_surface_water_ts_day": {
        const args = request.params.arguments as any;
        const params = {
            abbrev: args.abbrev,
            "min-measDate": args.startDate,
            "max-measDate": args.endDate
        };
        return await this.handleApiCall("surfacewater/surfacewatertsday", params);
    }
  • Zod schema definition for input validation of the tool parameters: station abbrev, start date, and end date.
    inputSchema: zodToJsonSchema(
        z.object({
            abbrev: z.string().describe("Station abbreviation (e.g., 'PLAPLACO')"),
            startDate: z.string().describe("Start date (MM/DD/YYYY or YYYY-MM-DD)"),
            endDate: z.string().describe("End date (MM/DD/YYYY or YYYY-MM-DD)"),
        })
    ),
  • src/index.ts:73-83 (registration)
    Registration of the tool in the listTools response, including name, description, and input schema.
    {
        name: "get_surface_water_ts_day",
        description: "Get daily time series data for a surface water station",
        inputSchema: zodToJsonSchema(
            z.object({
                abbrev: z.string().describe("Station abbreviation (e.g., 'PLAPLACO')"),
                startDate: z.string().describe("Start date (MM/DD/YYYY or YYYY-MM-DD)"),
                endDate: z.string().describe("End date (MM/DD/YYYY or YYYY-MM-DD)"),
            })
        ),
    },
  • Helper method that performs the actual HTTP GET request to the DWR API endpoint, handles API key, formats parameters, logs the request, and returns the JSON response as tool output.
    public async handleApiCall(endpoint: string, params: any) {
        const url = `${BASE_URL}/${endpoint}`;
        const headers: Record<string, string> = {};
        if (this.apiKey) {
            headers["Authorization"] = this.apiKey; // Or however DWR expects it, docs say 'Token: ...' or query param
        }
    
        // DWR docs say: "Token: B9xxxxx-xxxx-4D47-y" in header OR apiKey query param
        // I'll use query param if apiKey is present to be safe/easy, or header if I can confirm.
        // Docs: "Request Header: ... Token: ..."
        // Let's stick to query params for simplicity if header format is custom.
        // Actually, let's use the params object.
    
        const finalParams = formatParams(params);
        if (this.apiKey) {
            finalParams["apiKey"] = this.apiKey;
        }
    
        console.error(`Fetching ${url} with params ${JSON.stringify(finalParams)}`);
    
        const response = await axios.get(url, {
            params: finalParams,
            headers,
        });
    
        return {
            content: [
                {
                    type: "text",
                    text: JSON.stringify(response.data, null, 2),
                },
            ],
        };
    }
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 retrieving data but doesn't specify whether this is a read-only operation, if it requires authentication, rate limits, error handling, or the format of the returned data (e.g., JSON, CSV). This leaves significant gaps for an AI agent to understand the tool's 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 without unnecessary words. It directly communicates the tool's function, making it easy to parse and understand quickly.

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 complexity of a data retrieval tool with no annotations and no output schema, the description is insufficient. It doesn't explain what the returned time series data includes (e.g., water level, flow rate), how it's structured, or any limitations (e.g., date range constraints, data availability). This leaves the AI agent with incomplete information for proper usage.

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%, so the input schema already documents all three parameters (abbrev, startDate, endDate) with their types and formats. The description adds no additional semantic context beyond implying that 'abbrev' refers to a surface water station, which is already clear from the tool name and 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 verb ('Get') and resource ('daily time series data for a surface water station'), making the purpose specific and understandable. However, it doesn't explicitly distinguish this tool from its sibling 'get_surface_water_stations', which might retrieve station metadata rather than time series data.

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 'get_surface_water_stations' or 'query_dwr_api'. It lacks context about prerequisites, such as needing a valid station abbreviation, or exclusions, such as not supporting real-time data.

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/EdgeworthHitbox/dwr-mcp-server'

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