Skip to main content
Glama
danilat
by danilat

zaragoza-bizi-stations

Find bicycle rental stations in Zaragoza by entering your location coordinates to access the public Bizi service network.

Instructions

Get all Bizi stations in Zaragoza, the bicycle rental public service

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
latitudeYes
longitudeYes

Implementation Reference

  • Handler function fetches Bizi stations data from API, computes the top nearest stations based on provided latitude and longitude using helper functions, and returns JSON stringified nearest positions.
    async ({ latitude, longitude }) => {
      const response = await fetch("https://dndzgz.herokuapp.com/services/bizi");
      if (response.ok) {
        const data = await response.json();
        const nearestPositions = getTopNearestPositions(
          data.locations,
          latitude,
          longitude
        );
        return {
          content: [{ type: "text", text: JSON.stringify(nearestPositions) }],
        };
      } else {
        return {
          content: [
            {
              type: "text",
              text: "It was not possible to get the Bizi stations",
            },
          ],
        };
      }
    }
  • Zod schema defining required input parameters: latitude and longitude as numbers.
    {
      latitude: z.number(),
      longitude: z.number(),
    },
  • index.js:128-158 (registration)
    Registration of the zaragoza-bizi-stations tool on the MCP server, including name, description, input schema, and inline handler function.
    server.tool(
      "zaragoza-bizi-stations",
      "Get all Bizi stations in Zaragoza, the bicycle rental public service",
      {
        latitude: z.number(),
        longitude: z.number(),
      },
      async ({ latitude, longitude }) => {
        const response = await fetch("https://dndzgz.herokuapp.com/services/bizi");
        if (response.ok) {
          const data = await response.json();
          const nearestPositions = getTopNearestPositions(
            data.locations,
            latitude,
            longitude
          );
          return {
            content: [{ type: "text", text: JSON.stringify(nearestPositions) }],
          };
        } else {
          return {
            content: [
              {
                type: "text",
                text: "It was not possible to get the Bizi stations",
              },
            ],
          };
        }
      }
    );
  • Helper function that gets the top N (default 10) nearest positions by slicing the ordered list.
    function getTopNearestPositions(positions, latitude, longitude, size = 10) {
      return getOrderedPositionsByDistance(positions, latitude, longitude).slice(
        0,
        size
      );
  • Helper function computing haversine distance in meters between two positions, used in sorting nearest stations.
    function haversineDistanceInMeters(position1, position2) {
      const toRadians = (degrees) => degrees * (Math.PI / 180);
    
      const radiusOfEarth = 6371;
      const dLat = toRadians(position2.lat - position1.lat);
      const dLon = toRadians(position2.lon - position1.lon);
    
      const a =
        Math.sin(dLat / 2) * Math.sin(dLat / 2) +
        Math.cos(toRadians(position1.lat)) *
          Math.cos(toRadians(position2.lat)) *
          Math.sin(dLon / 2) *
          Math.sin(dLon / 2);
    
      const c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));
      return radiusOfEarth * c * 1000;
    }
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 the tool retrieves data ('Get all Bizi stations'), implying a read-only operation, but doesn't clarify whether it requires authentication, has rate limits, returns real-time or static data, or what format the output takes. The description is minimal and lacks essential behavioral 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 a single, efficient sentence that directly states the tool's purpose without unnecessary words. It's appropriately sized for a simple data retrieval tool and front-loads the core functionality.

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 apparent simplicity (2 parameters, no output schema, no annotations), the description is incomplete. It doesn't explain the purpose of the required latitude/longitude parameters, what data is returned, or how it differs from sibling tools. For a tool with undocumented parameters and no output schema, more context is needed.

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

Parameters2/5

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

The input schema has 2 required parameters (latitude, longitude) with 0% description coverage, and the tool description provides no information about these parameters. It doesn't explain what the latitude and longitude represent (e.g., center point for search, user location), their expected format, units, or valid ranges, leaving parameters undocumented.

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: 'Get all Bizi stations in Zaragoza, the bicycle rental public service.' It specifies the verb ('Get'), resource ('Bizi stations'), and location context ('in Zaragoza'), though it doesn't explicitly differentiate from sibling tools like 'zaragoza-bus-stops' or 'zaragoza-tram-stations' beyond the bicycle rental focus.

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. It doesn't mention sibling tools like 'zaragoza-bizi-estimations' (which might provide availability or timing data) or other transportation tools, nor does it specify any prerequisites or exclusions for usage.

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/danilat/mcp-dndzgz'

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