Skip to main content

CLI Reference

toolstorepy build

toolstorepy build --queries <path> [--index <name> | --index-url <url>] [options]

Flags

FlagDefaultDescription
--queriesrequiredPath to queries.json with tool_description entries
--indexName of a built-in index such as core-tools
--index-urlURL to a downloadable index archive
--workspacetoolstorepy_workspaceOutput workspace directory
--install-requirementsoffInstall cloned repo requirements into the workspace venv
--host0.0.0.0Host the generated MCP server binds on
--port8000Port the generated MCP server listens on
--llm-scanoffEnable LLM-based autonomous security review (bypasses human prompt)
--llm-modelclaude-sonnet-4-6Model for LLM scanning — any LangChain-supported string
--force-refreshoffRe-download the index archive even if cached
--verboseoffEnable verbose logging and full tracebacks on failure

Examples

# Basic build
toolstorepy build --queries queries.json --index core-tools

# Custom port
toolstorepy build --queries queries.json --index core-tools --port 9090

# Custom host and port
toolstorepy build --queries queries.json --index core-tools --host 127.0.0.1 --port 8080

# LLM-based autonomous security scan with default model (Claude)
export ANTHROPIC_API_KEY=sk-...
toolstorepy build --queries queries.json --index core-tools --llm-scan

# LLM scan with GPT-4o
export OPENAI_API_KEY=sk-...
toolstorepy build --queries queries.json --index core-tools --llm-scan --llm-model gpt-4o

# LLM scan with Gemini
export GOOGLE_API_KEY=...
toolstorepy build --queries queries.json --index core-tools --llm-scan --llm-model gemini-2.0-flash

# Full build with all options
toolstorepy build \
--queries queries.json \
--index core-tools \
--workspace ./my_workspace \
--install-requirements \
--host 0.0.0.0 \
--port 9090 \
--llm-scan \
--verbose

toolstorepy cache

Populate

Pre-warm the bare-repo cache from a resolved queries file (items must have a git_link field) or from explicit URLs.

# From a resolved queries file
toolstorepy cache populate --queries resolved.json

# From explicit URLs (can be repeated)
toolstorepy cache populate --url https://github.com/org/repo1.git \
--url https://github.com/org/repo2.git

# Force re-cache even if already cached
toolstorepy cache populate --url https://github.com/org/repo.git --force

List

toolstorepy cache list

Clear

toolstorepy cache clear

Cache command caveat

cache populate --queries expects items that already include git_link fields, not tool_description. That differs from the normal build input format. Use --url for direct URLs, or run a full toolstorepy build first to resolve descriptions to URLs and warm the cache automatically.


Server configuration

--host and --port are baked into the generated mcp_unified_server.py at build time. The output file will contain:

if __name__ == "__main__":
mcp.run(transport='streamable-http', host='0.0.0.0', port=8000)

The transport is always streamable-http. Only host and port are configurable.


LLM scan model strings

--llm-model accepts any LangChain-supported model string. The provider is inferred automatically from well-known prefixes.

ProviderExample model stringRequired env varInstall
Anthropicclaude-sonnet-4-6ANTHROPIC_API_KEYpip install langchain-anthropic
OpenAIgpt-4oOPENAI_API_KEYpip install langchain-openai
Googlegemini-2.0-flashGOOGLE_API_KEYpip install langchain-google-genai
Mistralmistral-large-latestMISTRAL_API_KEYpip install langchain-mistralai

You can also use explicit provider prefix syntax: anthropic:claude-sonnet-4-6, openai:gpt-4o.


Index authoring scripts

These are part of the current reference index-authoring workflow.

Create tool metadata interactively

python vector_db_creation/toon_file_creation.py

Build the vector database

python vector_db_creation/embed_toon.py

Typical build commands

# Minimal
toolstorepy build --queries queries.json --index core-tools

# With requirements installed and custom port
toolstorepy build --queries queries.json --index core-tools --install-requirements --port 9090

# Fully automated with LLM security scan (no human prompts)
toolstorepy build --queries queries.json --index core-tools --llm-scan