Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
CODE_MODE_TOON_CONFIGYesThe path to your MCP configuration file (e.g., ~/.cursor/mcp.json or ~/Library/Application\ Support/Claude/claude_desktop_config.json) which allows the orchestrator to locate and lazy-load other MCP servers.

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
execute_code

WHEN TO USE:

  • Batching 3+ MCP tool calls (saves round-trips, maintains state)

  • Processing large structured data (TOON compression: 30-90% savings)

  • Complex logic with conditionals/loops across tool results

DO NOT USE:

  • Single simple tool call → use direct MCP

  • Unstructured prose → TOON compression <10%

AVAILABLE SERVERS: LAZY-LOAD ON DEMAND:

WORKFLOWS (use execute_workflow instead for these):

  • k8s-detective: Comprehensive Kubernetes cluster security and health auditor | USAGE: Scans pods, deployments, services, and events for security vulnerabilities, resource inefficiencies, and stability issues. Outputs detailed findings with severity ratings. EXAMPLE: "Audit my production cluster for security risks" PARAMETERS:

  • outputFile: Path to save TOON-compressed audit data (required)

  • namespace: Specific namespace to scan (optional, default: all)

  • includeEvents: Analyze recent events for warnings (optional, default: true) REQUIRES: kubectl configured with cluster access NOTES: Requires kubectl in PATH. Large clusters auto-TOON-encode. Run from bastion or local with kubeconfig.

  • post-mortem: Intelligent log analysis with pattern clustering and anomaly detection | USAGE: Parses log files, clusters similar messages by signature, extracts dynamic data (timestamps, IDs, IPs), identifies anomalies and errors, and generates an actionable report. EXAMPLE: "Analyze application logs from the outage and find the root cause" PARAMETERS:

  • logFile: Path to the log file to analyze (required)

  • outputFile: Path to save TOON-compressed analysis (required)

  • maxExamples: Max example lines per cluster (optional, default: 5)

  • includePatterns: Include normal patterns in output (optional, default: true) REQUIRES: filesystem access NOTES: Supports large files via streaming. Auto-detects log levels and categories.

  • research: Multi-source research aggregator with parallel execution and synthesis | USAGE: Orchestrates data fetching from Context7 (library docs), Wikipedia (concepts), and Perplexity (web Q&A). Supports parallel execution, retry logic, rate limiting, optional LLM synthesis, and file output. EXAMPLE: "Research xsync library performance vs sync.Map with benchmarks and theory. libraryIDs: ['puzpuzpuz/xsync'], wikipediaTopics: ['Hash table']" PARAMETERS:

  • goal: Primary research objective (required)

  • libraryIDs: Context7 library IDs for docs ["puzpuzpuz/xsync"] (optional)

  • queries: Perplexity questions ["xsync benchmarks?"] (optional)

  • wikipediaTopics: Wikipedia articles ["Lock-free data structures"] (optional)

  • synthesize: LLM synthesis of findings (optional, default: false)

  • outputFile: Path to save TOON-compressed results (optional)

  • batchSize: Max parallel requests per source (optional, default: 5) REQUIRES: At least one of: context7, wikipedia, perplexity (optional: brave-search as fallback) NOTES: Gracefully degrades if MCPs unavailable. Large outputs auto-TOON-encode.

USAGE PATTERN:

// 1. Discover tools first
const api = await get_tool_api({serverName: 'perplexity'});

// 2. Call tools via proxy
const result = await servers['perplexity'].perplexity_ask({
  messages: [{role: 'user', content: 'Your query'}]
});

// 3. Compress large results
console.log(TOON.encode(result));

ERROR RECOVERY:

  • "Server not found" → list_servers shows available

  • "Tool undefined" → get_tool_api({serverName}) shows tools

  • "Timeout (60s)" → break into smaller operations

All results TOON-compressed by default.

execute_workflow

USE WHEN you need research, K8s auditing, or incident analysis. Pre-built automation with parallel execution and automatic retries.

list_workflows

CALL FIRST to discover available automations before writing custom code. Returns workflow names, descriptions, and required parameters.

search_tools

USE WHEN you don't know which server has the tool you need. Searches across all loaded MCP servers by name/description.

get_tool_api

CALL BEFORE using a server to see exact parameter schemas. Returns all tools with their input requirements.

set_project_root

Set project root for path resolution

list_servers

CALL FIRST to see what MCP servers are available. Shows loaded, lazy (on-demand), and disabled servers.

usage_guide

CALL WHEN confused about CodeModeTOON. Returns step-by-step guides for quickstart, troubleshooting, and best practices.

suggest_approach

CALL WHEN UNSURE whether to use execute_code, execute_workflow, or direct MCP.

Analyzes your task and recommends the most efficient approach. Considers: operation count, data size, existing workflows.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Latest Blog Posts

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/ziad-hsn/code-mode-toon'

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