Skip to main content
Glama

MCP-PIF Server

by hungryrobot1
Registry.hs1.24 kB
{-# LANGUAGE OverloadedStrings #-} {-| Module: Tools.Registry Description: In-memory storage for evolved tools The Registry stores tools created via the `evolve` MCP command. Tools are stored as validated Terms (not raw JSON) to ensure structural correctness. Key characteristics: - Ephemeral: Tools exist only for the session duration (no persistence) - Immutable during evaluation: Tools cannot modify the registry from within - Name-based lookup: Tools are identified by unique text names The registry enforces a boundary between tool creation (MCP level, effectful) and tool execution (lambda calculus level, pure). This prevents unbounded self-modification and maintains deterministic evaluation. -} module Tools.Registry where import Data.Text (Text) import Core.Syntax (Term) import qualified Data.Map.Strict as M data Tool = Tool { toolName :: Text , toolDescription :: Text , toolCode :: Term -- Changed from Value to Term } type Registry = M.Map Text Tool emptyRegistry :: Registry emptyRegistry = M.empty lookupTool :: Text -> Registry -> Maybe Tool lookupTool = M.lookup insertTool :: Text -> Tool -> Registry -> Registry insertTool = M.insert listTools :: Registry -> [Tool] listTools = M.elems

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/hungryrobot1/MCP-PIF'

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