Tool Registry is a reference implementation and specification to publish, curate, and expose value‑adding services, workflows, and tools in a managed registry. The service exposes a small HTTP API that reads tool descriptors (JSON files) from a configured directory and returns listings or single tool metadata.
The current service is hosted and the OpenAPI docs are available at:
https://tool-registry.labs.dansdemo.nl/docs
Use the URL above to access the interactive API documentation (Swagger UI) and try the endpoints directly.
-
List all supported tools:
- Method:
GET - Endpoint:
/tools/ - Response: JSON array of objects with
toolURI,toolLabel, andtoolDescription.
- Method:
-
Retrieve a single tool by identifier:
- Method:
GET - Endpoint:
/tools/{identifier} - Supported identifier formats:
edc:fil.<...>— match by file type (typeURI).edc:tool.<...>— match by tool URI (toolURI).
- Response: JSON object with either
typeURIortoolURIplustoolLabel,toolDescription. Returns{}when not found.
- Method:
-
Root (public) endpoints:
- Method:
GET - Endpoint:
/— API root (seesrc/tool_registry/api/root.pyfor behavior). - Method:
GET - Endpoint:
/{filter_by}— additional public filters (implementation dependent).
- Method:
- Endpoints use an API key. Provide the key with an HTTP
Authorizationheader:Authorization: Bearer <TOOL_REGISTRY_API_KEY>
- The key is read from application settings (
app_settings.TOOL_REGISTRY_API_KEY).
TOOL_REGISTRY_API_KEY— required API key for protected endpoints.SUPPORTED_TOOLS_DIR— directory path containing.jsontool descriptor files.EXPOSE_PORT— port for the HTTP server (default2005).APP_NAME— optional application name.
uv is a lightweight tool used in this project to create a Python virtual environment and install dependencies from the uv.lock file. See the project repository: https://github.com/astral-sh/uv.
How this project uses uv
- The
Dockerfilepulls theghcr.io/astral-sh/uv:latestimage and runs:uv venv .venv— create a virtual environment at./.venv.uv sync --frozen --no-cache— install pinned dependencies fromuv.lockinto the venv.
- Local workflow uses the same two commands to reproduce the runtime environment locally.
Install and use uv on macOS
- Recommended — use the official container (no local install required)
- Create venv:
docker run --rm -v $(pwd):/work -w /work ghcr.io/astral-sh/uv:latest uv venv .venv
- Sync dependencies:
docker run --rm -v $(pwd):/work -w /work ghcr.io/astral-sh/uv:latest uv sync --frozen --no-cache
- Install the
uvbinary (manual or Homebrew)
-
Option A — Install via Homebrew (recommended on macOS)
- If the
astral-sh/uvtap is available:brew tap astral-sh/uvbrew install astral-sh/uv/uv
- If a core/homebrew formula exists for your Homebrew installation (try this first):
brew install uv
- Verify installation:
uv --version
- Notes:
- On Apple Silicon (M1/M2), Homebrew prefix is typically
/opt/homebrew; binaries installed by Homebrew are placed in the Homebrewbindirectory and do not requiresudo.
- On Apple Silicon (M1/M2), Homebrew prefix is typically
- If the
-
Option B — Install the
uvbinary (manual)- Determine architecture (optional):
uname -m#arm64for Apple Silicon,x86_64for Intel
- Download the appropriate macOS binary from
https://github.com/astral-sh/uv/releases(choose the release and thedarwinbinary matching your architecture).- Example (replace
<TAG>and<arch>with the release tag and architecture):curl -Lo uv https://github.com/astral-sh/uv/releases/download/<TAG>/uv-darwin-<arch>
- Example (replace
- Make it executable and move it into your PATH:
chmod +x uv- Move to a directory in your PATH:
- Intel/macOS (default Homebrew location on Intel):
sudo mv uv /usr/local/bin/uv - Apple Silicon (Homebrew default):
mv uv /opt/homebrew/bin/uv# may requiresudodepending on permissions
- Intel/macOS (default Homebrew location on Intel):
- Verify:
uv --version
- Determine architecture (optional):
- Using
uvlocally
- Create venv:
uv venv .venv - Activate venv (optional):
source .venv/bin/activate - Sync deps:
uv sync --frozen --no-cache
pyproject.toml— project metadata and dependencies.README.md— this file.Dockerfile— container build instructions.src/main.py— application entrypoint and FastAPI app configuration.src/tool_registry/api/public.py— tools public API implementation.supported-tools/— (not in repo) expected directory for tool JSON files.
- Each supported tool is a JSON file in
SUPPORTED_TOOLS_DIR. - Minimal fields used by the API:
toolURI(string) — unique tool identifier.toolProperties(object) — may containtoolLabelandtoolDescription.typeURI(array|string) — optional types for matchingedc:fil.*.
- Build the Docker image:
-
docker build -t tool-registry-service . - Run the container:
-
docker run -d -p 2005:2005 -e TOOL_REGISTRY_API
_KEY=your_api_key_here tool-registry-service ```
List all tools:
curl -H "Authorization: Bearer your_api_key_here" http://localhost:2005/tools/Get a tool by tool URI:
curl -H "Authorization: Bearer your_api_key_here" http://localhost:2005/tools/edc:tool.example_tool
Get a tool by file type:
curl -H "Authorization: Bearer your_api_key_here" http://localhost:2005/tools/edc:fil.example_typeThis project is licensed under the MIT License. See the LICENSE file for details.