Skip to main content
Glama
variflight

Variflight Tripmatch MCP Server

Official
by variflight

getTodayDate

Retrieve today's date in YYYY-MM-DD format from the Variflight Tripmatch MCP Server for accurate travel planning and booking operations.

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 handler function that computes today's date in the local timezone and formats it as YYYY-MM-DD, returning it in the MCP content format.
    }, 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 input schema for the tool, featuring a dummy optional string parameter to satisfy MCP requirements for tools to have at least one parameter.
    random_string: z.string() .optional() .describe("Dummy parameter for no-parameter tools")
  • dist/index.js:166-184 (registration)
    The server.tool call that registers the 'getTodayDate' tool with the MCP server, including its description, input 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