Our review
Provides advanced commands and performance tuning options for the zai-cli command-line tool, including direct MCP tool invocation, TypeScript tool chain execution, and cache/timeout management.
Strengths
- Enables direct interaction with MCP tools via schemas and raw calls.
- Offers a code mode to run TypeScript scripts and evaluate expressions.
- Provides environment variables to fine-tune caching, retries, and timeouts.
Limitations
- Requires deep knowledge of zai-cli and MCP tools.
- Performance settings are specific to zai-cli and not portable.
- MCP error handling may need manual adjustments.
Best for automating complex workflows with zai-cli, debugging MCP tools, or optimizing performance in production environments.
Avoid when using zai-cli with basic commands or when network performance optimization is unnecessary.
Security analysis
SafeThe skill provides reference documentation for the zai-cli tool, with no destructive or exfiltrating instructions. All commands are standard CLI usage and environment variable settings, posing no execution risk.
No concerns found
Examples
Show me all available MCP tools with their full schemas, but skip vision-related ones.Run the TypeScript tool chain from ./chain.ts using zai-cli code mode.Set the MCP tool cache TTL to 5 minutes and enable caching for faster tool discovery.Advanced Usage
This reference covers advanced commands and performance tuning for zai-cli.
Raw MCP Tools
Use these when you need schemas or direct tool invocation.
zai-cli tools [--filter <text>] [--full] [--typescript] [--no-vision]zai-cli tool <name> [--no-vision]zai-cli call <tool> [--json <json> | --file <path> | --stdin] [--dry-run] [--no-vision]
Examples
zai-cli tools --filter vision --full
zai-cli tool zai.zread.search_doc --no-vision
zai-cli call zai.search.webSearchPrime --json '{"search_query":"LLM tools"}'
Code Mode (TypeScript tool chains)
zai-cli code run ./chain.ts
zai-cli code eval "await call('zai.search.webSearchPrime', { search_query: 'zai cli' })"
zai-cli code interfaces
Performance Tuning
Skip vision MCP startup
zai-cli tools --no-vision
zai-cli doctor --no-vision
Tool discovery cache (speeds tools/tool/doctor)
Defaults: enabled, 24 hour TTL.
export ZAI_MCP_TOOL_CACHE=1
export ZAI_MCP_TOOL_CACHE_TTL_MS=300000
export ZAI_MCP_CACHE_DIR="$HOME/.cache/zai-cli"
Retries for transient MCP failures
# Vision-only retries (default 2)
export ZAI_MCP_VISION_RETRY_COUNT=2
# Global retries for all tools
export ZAI_MCP_RETRY_COUNT=1
Timeout
export Z_AI_TIMEOUT=300000 # milliseconds
Next.js App Router Expert
Development
A skill that turns Claude into a Next.js App Router expert.
README Generator
Development
Creates professional and comprehensive README.md files for your projects.
API Documentation Writer
Development
Generates comprehensive API documentation in OpenAPI/Swagger format.