Skip to main content
Glama
dh1789

My First MCP

by dh1789

get_server_info

Retrieve server information and available tools from the My First MCP tutorial server for basic utility operations.

Instructions

이 MCP 서버의 정보와 사용 가능한 Tool 목록을 반환합니다.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Core handler function implementing the get_server_info tool logic. Returns a ServerInfo object containing server name, version, description, and list of available tools.
    export function getServerInfo(): ServerInfo { return { name: "my-first-mcp", version: "1.0.0", description: "MCP 서버 개발 튜토리얼 - 첫 번째 MCP 서버", tools: [ "get_current_time - 현재 시간 조회", "calculate - 사칙연산 계산기", "get_random_number - 랜덤 숫자 생성", "reverse_string - 문자열 뒤집기", "get_server_info - 서버 정보 조회", ], }; }
  • Type definition (schema) for the ServerInfo output returned by the get_server_info handler.
    export interface ServerInfo { name: string; version: string; description: string; tools: string[]; }
  • src/index.ts:244-272 (registration)
    Registration of the get_server_info tool in the MCP server. Includes empty input schema ({}), description, and thin wrapper handler that formats the output from getServerInfo() as MCP text content response.
    server.tool( "get_server_info", "이 MCP 서버의 정보와 사용 가능한 Tool 목록을 반환합니다.", {}, async () => { const info = getServerInfo(); const infoText = ` === ${info.name} 서버 정보 === 버전: ${info.version} 설명: ${info.description} 사용 가능한 Tool: ${info.tools.map((t, i) => `${i + 1}. ${t}`).join("\n")} GitHub: https://github.com/dh1789/my-first-mcp `.trim(); return { content: [ { type: "text", text: infoText, }, ], }; } );

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/dh1789/my-first-mcp'

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