Skip to main content
Glama

get_waste_collection

Retrieve upcoming waste collection schedules for Zurich city ZIP codes. Filter by waste type and set date limits to plan disposal efficiently.

Instructions

Get upcoming waste collection dates for a Zurich city ZIP code. Returns the next scheduled pickups sorted by date. Currently covers Zurich city only (ZIP codes 8001–8099). Powered by OpenERZ (openerz.metaodi.ch).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
zipYesZurich city ZIP code (e.g. '8001', '8004', '8032'). Covers 8001–8099.
typeNoWaste type to filter by (e.g. 'cardboard', 'waste', 'paper', 'organic', 'textile', 'special', 'mobile'). If omitted, returns all types.
limitNoMaximum number of upcoming collection dates to return. Default: 5.

Implementation Reference

  • The handler function logic for 'get_waste_collection', which validates the zip, fetches calendar data using the `fetchCalendar` helper, and formats the response.
    case "get_waste_collection": {
      const zip = String(args.zip ?? "").trim();
      if (!zip) {
        throw new Error("zip is required (e.g. '8001')");
      }
      const type = args.type as string | undefined;
      const limit = typeof args.limit === "number" ? Math.max(1, Math.min(args.limit, 100)) : 5;
    
      const entries = await fetchCalendar({
        zip,
        types: type,
        start: todayISO(),
        limit,
      });
    
      const collections = entries.slice(0, limit).map(compactEntry);
    
      return JSON.stringify({
        zip,
        type: type ?? "all",
        upcoming: collections,
        count: collections.length,
        note: "Covers Zurich city ZIP codes 8001–8099 only.",
        source: "openerz.metaodi.ch",
      });
    }
  • The tool definition (schema) for 'get_waste_collection', describing its input parameters (zip, type, limit).
    {
      name: "get_waste_collection",
      description:
        "Get upcoming waste collection dates for a Zurich city ZIP code. Returns the next scheduled pickups sorted by date. " +
        "Currently covers Zurich city only (ZIP codes 8001–8099). " +
        "Powered by OpenERZ (openerz.metaodi.ch).",
      inputSchema: {
        type: "object",
        required: ["zip"],
        properties: {
          zip: {
            type: "string",
            description: "Zurich city ZIP code (e.g. '8001', '8004', '8032'). Covers 8001–8099.",
          },
          type: {
            type: "string",
            description:
              "Waste type to filter by (e.g. 'cardboard', 'waste', 'paper', 'organic', 'textile', 'special', 'mobile'). " +
              "If omitted, returns all types.",
            enum: SUPPORTED_WASTE_TYPES,
          },
          limit: {
            type: "number",
            description: "Maximum number of upcoming collection dates to return. Default: 5.",
          },
        },
      },
    },
Behavior4/5

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

With no annotations provided, the description carries full burden and does well by disclosing key behavioral traits: it returns 'next scheduled pickups sorted by date', specifies geographic coverage constraints, mentions the data source, and implies it's a read-only query (consistent with 'get' prefix). It doesn't mention rate limits or error handling, but covers the essential operational context.

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 perfectly front-loaded with the core purpose in the first sentence, followed by important constraints and data source. Every sentence earns its place with zero wasted words, making it highly efficient and readable.

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

Completeness4/5

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

For a read-only query tool with 100% schema coverage but no output schema, the description provides strong context about geographic scope, sorting behavior, and data source. It could slightly improve by hinting at the return format (e.g., 'Returns list of dates with waste types') since there's no output schema, but it's largely complete for its complexity level.

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?

Schema description coverage is 100%, so the schema already fully documents all three parameters. The description adds no additional parameter semantics beyond what's in the schema descriptions, maintaining the baseline score of 3 for adequate but not enhanced coverage.

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

Purpose5/5

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

The description clearly states the specific action ('Get upcoming waste collection dates'), resource ('for a Zurich city ZIP code'), and scope ('Currently covers Zurich city only (ZIP codes 8001–8099)'). It distinguishes from sibling tools like 'get_waste_calendar' by specifying it returns sorted upcoming dates rather than a full calendar.

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

Usage Guidelines4/5

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

The description provides clear context about geographic limitations ('Zurich city only') and data source ('Powered by OpenERZ'), which helps determine when to use it. However, it doesn't explicitly mention when not to use it or name alternatives among sibling tools (e.g., 'get_waste_calendar').

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/vikramgorla/mcp-swiss'

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