Skip to main content
Glama
variflight

Variflight Tripmatch MCP Server

Official
by variflight

getTodayDate

Retrieve today's date in YYYY-MM-DD format according to the local timezone. Avoid hardcoding dates by using this tool for accurate and dynamic date retrieval.

Instructions

Get today's date in local timezone (YYYY-MM-DD format). Use this tool whenever you need today's date - NEVER hardcode dates.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
random_stringNoDummy parameter for no-parameter tools

Implementation Reference

  • The asynchronous handler function that computes today's date using new Date(), formats it to YYYY-MM-DD, and returns it as text content.
    }, async () => { const today = new Date(); const year = today.getFullYear(); const month = String(today.getMonth() + 1).padStart(2, '0'); const day = String(today.getDate()).padStart(2, '0'); const todayDate = `${year}-${month}-${day}`; return { content: [ { type: "text", text: todayDate } ] }; });
  • Zod schema for input parameters: an optional dummy string to allow no-parameter tool calls.
    random_string: z.string() .optional() .describe("Dummy parameter for no-parameter tools")
  • dist/index.js:166-184 (registration)
    Full registration of the getTodayDate tool using server.tool(), including description, schema, and inline handler function.
    server.tool("getTodayDate", "Get today's date in local timezone (YYYY-MM-DD format). Use this tool whenever you need today's date - NEVER hardcode dates.", { random_string: z.string() .optional() .describe("Dummy parameter for no-parameter tools") }, async () => { const today = new Date(); const year = today.getFullYear(); const month = String(today.getMonth() + 1).padStart(2, '0'); const day = String(today.getDate()).padStart(2, '0'); const todayDate = `${year}-${month}-${day}`; return { content: [ { type: "text", text: todayDate } ] }; });

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/variflight/tripmatch-mcp'

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