Skip to main content
Glama

Model Context Protocol Server

by hyen43
WeatherTool.js616 B
import { MCPTool } from "mcp-framework"; import { z } from "zod"; class WeatherTool extends MCPTool { name = "weather"; description = "도시의 날씨 정보를 가져오기"; // Zod를 사용한 스키마 검증 schema = { city: { type: z.string(), description: "도시 이름 (예: 런던)", }, }; async execute({ city }) { // 실제 API 호출로 대체해야 합니다 return { city, temperature: 22, condition: "맑음", humidity: 45, }; } } export default WeatherTool;

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/hyen43/mcpServer'

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