We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/dimitar-grigorov/mcp-file-tools'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
response.go•499 B
package handler
import "github.com/modelcontextprotocol/go-sdk/mcp"
// Response helpers for handler operations.
// These provide consistent error and success response formatting across all handlers.
// errorResult creates an error CallToolResult with the given message.
// Use this for all error responses to maintain consistency.
func errorResult(message string) *mcp.CallToolResult {
return &mcp.CallToolResult{
Content: []mcp.Content{&mcp.TextContent{Text: message}},
IsError: true,
}
}