Skip to main content
Glama

zaragoza-bus-estimations

Check real-time bus arrival times at specific stops in Zaragoza using the DNDzgz MCP Server API. Simplify your commute by accessing accurate estimations directly.

Instructions

Get the estimation of when a bus arrives to a stop in Zaragoza in realtime

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
stopYes

Implementation Reference

  • The handler function fetches real-time bus arrival estimations from the API endpoint https://dndzgz.herokuapp.com/services/bus/${stop} and returns the JSON data or an error message.
    async ({ stop }) => { const response = await fetch( `https://dndzgz.herokuapp.com/services/bus/${stop}` ); if (response.ok) { const data = await response.json(); return { content: [{ type: "text", text: JSON.stringify(data) }], }; } else { return { content: [ { type: "text", text: `Is not possible to get the estimate for the stop ${stop}`, }, ], }; } }
  • Input schema defining the 'stop' parameter as a number using Zod.
    { stop: z.number() },
  • index.js:102-126 (registration)
    Registration of the 'zaragoza-bus-estimations' tool using server.tool(), including name, description, schema, and handler.
    server.tool( "zaragoza-bus-estimations", "Get the estimation of when a bus arrives to a stop in Zaragoza in realtime", { stop: z.number() }, async ({ stop }) => { const response = await fetch( `https://dndzgz.herokuapp.com/services/bus/${stop}` ); if (response.ok) { const data = await response.json(); return { content: [{ type: "text", text: JSON.stringify(data) }], }; } else { return { content: [ { type: "text", text: `Is not possible to get the estimate for the stop ${stop}`, }, ], }; } } );

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