Skip to main content
Glama

get_system_info

Retrieve system information like current date and timezone for AI assistants to handle time-based queries and date filtering tasks.

Instructions

Get system information and utilities for AI assistants. Provides current date, timezone, and other helpful context that AI assistants may not have access to. Use this when you need reference information for date filtering, time-based queries, or other system context.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
infoNoType of system information to retrieve: "date" for current date only, "timezone" for timezone info, "all" for everythingall

Implementation Reference

  • The handler function for the 'get_system_info' tool. It retrieves the current date, time, and timezone information based on the input parameter 'info' and formats a response accordingly.
    async (input) => { const now = new Date(); const currentDate = now.toISOString().split('T')[0]; const currentTime = now.toISOString(); const timezone = Intl.DateTimeFormat().resolvedOptions().timeZone; let response = ''; if (input.info === 'date') { response = `Current date: ${currentDate}`; } else if (input.info === 'timezone') { response = `Timezone: ${timezone}`; } else { response = [ `Current date: ${currentDate}`, `Current time: ${currentTime}`, `Timezone: ${timezone}`, ``, `Use this date information when applying date filters to search_conversations.`, `Date format for filters: YYYY-MM-DD (e.g., "${currentDate}")` ].join('\n'); } return { content: [{ type: 'text', text: response }] }; } );
  • The Zod schema defining the input parameters for the 'get_system_info' tool, specifically the 'info' enum parameter.
    { info: z.enum(['date', 'timezone', 'all']).optional().default('all').describe('Type of system information to retrieve: "date" for current date only, "timezone" for timezone info, "all" for everything') },
  • src/server.ts:385-421 (registration)
    The registration of the 'get_system_info' tool using server.tool(), including name, description, schema, and inline handler.
    server.tool( 'get_system_info', 'Get system information and utilities for AI assistants. Provides current date, timezone, and other helpful context that AI assistants may not have access to. Use this when you need reference information for date filtering, time-based queries, or other system context.', { info: z.enum(['date', 'timezone', 'all']).optional().default('all').describe('Type of system information to retrieve: "date" for current date only, "timezone" for timezone info, "all" for everything') }, async (input) => { const now = new Date(); const currentDate = now.toISOString().split('T')[0]; const currentTime = now.toISOString(); const timezone = Intl.DateTimeFormat().resolvedOptions().timeZone; let response = ''; if (input.info === 'date') { response = `Current date: ${currentDate}`; } else if (input.info === 'timezone') { response = `Timezone: ${timezone}`; } else { response = [ `Current date: ${currentDate}`, `Current time: ${currentTime}`, `Timezone: ${timezone}`, ``, `Use this date information when applying date filters to search_conversations.`, `Date format for filters: YYYY-MM-DD (e.g., "${currentDate}")` ].join('\n'); } return { content: [{ type: 'text', text: response }] }; } );

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/vltansky/cursor-conversations-mcp'

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