// Package metadata provides tool discovery and metadata loading for toolsrv. // // Tools are external executables with associated .meta JSON files that // describe their interface. This package discovers tools on disk and // parses their metadata. // // # Discovery // // DiscoverTools scans the tools directory ($XDG_CONFIG_HOME/ollie/tools) // for executable files with matching .meta sidecar files. Both compiled // Go tools and script tools use the same discovery mechanism. // // # Metadata Format // // The .meta file is JSON: // // { // "description": "Short description for prompts", // "prompt": "## tool_name\n\nDetailed usage...", // "args": { "path": {"type": "string", "description": "..."} }, // "tier": "hot", // "scope": "write", // "timeout": 30 // } // // Fields: // - description: one-line summary for tool listing // - prompt: full documentation injected into system prompt // - args: JSON Schema for tool arguments // - tier: hot (always injected), warm, cold (on-demand) // - scope: read, write, global (for conflict detection) // - timeout: default execution timeout in seconds package metadata