Skip to main content
Glama

ZigNet

MCP Server for Zig โ€” Intelligent code analysis, validation, and documentation powered by a fine-tuned LLM

ZigNet integrates with Claude (and other MCP-compatible LLMs) to provide real-time Zig code analysis without leaving your chat interface.


๐ŸŽฏ Features

MCP Tools

Analyze Zig code for syntax errors, type mismatches, and semantic issues using zig ast-check.

Example usage:

User: "Analyze this Zig code"
Claude: [calls analyze_zig tool]
Response: "โœ… Syntax: Valid | Type Check: PASS | Warnings: 0"

Capabilities:

  • Lexical analysis (tokenization)

  • Syntax parsing (AST generation)

  • Type checking and validation

  • Semantic error detection

  • Line/column error reporting

Validate and format Zig code using zig fmt, generating clean, idiomatic output.

Example:

// Input (messy)
fn add(a:i32,b:i32)i32{return a+b;}

// Output (formatted)
fn add(a: i32, b: i32) i32 {
    return a + b;
}

Capabilities:

  • Code formatting (2-space indentation)

  • Syntax validation

  • Best practices enforcement

  • Preserves semantics

Retrieve Zig documentation and explanations for language features using a fine-tuned LLM.

Example:

Query: "comptime"
Response: "comptime enables compile-time evaluation in Zig..."

Powered by:

  • Fine-tuned Qwen2.5-Coder-7B model

  • 13,756 examples from Zig 0.13-0.15

  • Specialized on advanced Zig idioms (comptime, generics, error handling)

Get intelligent code fix suggestions for Zig errors using AI-powered analysis.

Example:

// Error: "Type mismatch: cannot assign string to i32"
var x: i32 = "hello";

// Suggestions:
// Option 1: var x: []const u8 = "hello";  // If you meant string
// Option 2: var x: i32 = 42;              // If you meant integer

Features:

  • Context-aware suggestions

  • Multiple fix options

  • Explanation of the issue

  • Zig idiom recommendations


Related MCP server: zig-mcp

๐Ÿ“– Usage

ZigNet is an MCP server โ€” configure it once in your MCP client, then use it naturally in conversation.

Configuration file location:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

  • Linux: ~/.config/Claude/claude_desktop_config.json

  • Windows: %APPDATA%\Claude\claude_desktop_config.json

Add this:

{
  "mcpServers": {
    "zignet": {
      "command": "npx",
      "args": ["-y", "zignet"]
    }
  }
}

Then restart Claude Desktop and start using:

You: "Analyze this Zig code for errors"
     [paste code]

Claude: [uses analyze_zig tool]
        "Found 1 type error: variable 'x' expects i32 but got []const u8"

Method 1: VS Code Marketplace (coming soon)

  1. Open VS Code Extensions (Ctrl+Shift+X / Cmd+Shift+X)

  2. Search for @mcp zignet

  3. Click Install

  4. Restart VS Code

Method 2: Manual configuration (available now)

  1. Install GitHub Copilot extension (if not already installed)

  2. Open Copilot settings

  3. Add to MCP servers config:

{
  "mcpServers": {
    "zignet": {
      "command": "npx",
      "args": ["-y", "zignet"]
    }
  }
}

Then restart VS Code and Copilot will have access to ZigNet tools.

What happens after configuration?

  1. First use: npx downloads and caches ZigNet automatically

  2. Zig compiler: Downloads on-demand (supports Zig 0.13, 0.14, 0.15)

  3. Tools available: analyze_zig, compile_zig (+ get_zig_docs, suggest_fix coming soon)

  4. Zero maintenance: Updates automatically via npx -y zignet


โš™๏ธ Configuration

GPU Selection (Multi-GPU Systems)

If you have multiple GPUs (e.g., AMD + NVIDIA), you can control which GPU ZigNet uses via environment variables.

Windows (PowerShell):

$env:ZIGNET_GPU_DEVICE="0"
npx -y zignet

macOS/Linux:

export ZIGNET_GPU_DEVICE="0"
npx -y zignet

VS Code MCP Configuration with GPU selection:

{
  "mcpServers": {
    "zignet": {
      "command": "npx",
      "args": ["-y", "zignet"],
      "env": {
        "ZIGNET_GPU_DEVICE": "0"
      }
    }
  }
}

Claude Desktop configuration with GPU selection:

macOS/Linux (~/.config/Claude/claude_desktop_config.json):

{
  "mcpServers": {
    "zignet": {
      "command": "npx",
      "args": ["-y", "zignet"],
      "env": {
        "ZIGNET_GPU_DEVICE": "0"
      }
    }
  }
}

Windows (%APPDATA%\Claude\claude_desktop_config.json):

{
  "mcpServers": {
    "zignet": {
      "command": "npx",
      "args": ["-y", "zignet"],
      "env": {
        "ZIGNET_GPU_DEVICE": "0"
      }
    }
  }
}

GPU Device Values:

  • "0" - Use first GPU only (e.g., RTX 4090)

  • "1" - Use second GPU only

  • "0,1" - Use both GPUs

  • Not set - Use all available GPUs (default)

Identify your GPUs:

# NVIDIA GPUs
nvidia-smi

# Output shows GPU indices:
# GPU 0: NVIDIA RTX 4090
# GPU 1: AMD Radeon 6950XT (won't be used by CUDA anyway)

Advanced Configuration

All configuration options can be set via environment variables:

Variable

Default

Description

ZIGNET_GPU_DEVICE

auto

GPU device selection (CUDA_VISIBLE_DEVICES)

ZIGNET_GPU_LAYERS

35

Number of model layers on GPU (0=CPU only)

ZIGNET_MODEL_PATH

~/.zignet/models/...

Custom model path

ZIGNET_MODEL_AUTO_DOWNLOAD

true

Auto-download model from HuggingFace

ZIGNET_CONTEXT_SIZE

4096

LLM context window size

ZIGNET_TEMPERATURE

0.7

LLM creativity (0.0-1.0)

ZIGNET_TOP_P

0.9

LLM sampling parameter

ZIG_SUPPORTED

0.13.0,0.14.0,0.15.2

Supported Zig versions

ZIG_DEFAULT

0.15.2

Default Zig version

See .env.example for detailed examples.


๐Ÿ—๏ธ Architecture

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ Claude / MCP Client                                 โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                     โ”‚ MCP Protocol (JSON-RPC)
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ ZigNet MCP Server (TypeScript)                      โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”   โ”‚
โ”‚  โ”‚ Tool Handlers                                โ”‚   โ”‚
โ”‚  โ”‚ - analyze_zig                                โ”‚   โ”‚
โ”‚  โ”‚ - compile_zig                                โ”‚   โ”‚
โ”‚  โ”‚ - get_zig_docs                               โ”‚   โ”‚
โ”‚  โ”‚ - suggest_fix                                โ”‚   โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜   โ”‚
โ”‚                โ–ผ                                    โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”   โ”‚
โ”‚  โ”‚ Zig Compiler Integration                     โ”‚   โ”‚
โ”‚  โ”‚ - zig ast-check (syntax + type validation)   โ”‚   โ”‚
โ”‚  โ”‚ - zig fmt (official formatter)               โ”‚   โ”‚
โ”‚  โ”‚ - Auto-detects system Zig installation       โ”‚   โ”‚
โ”‚  โ”‚ - Falls back to downloading if needed        โ”‚   โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜   โ”‚
โ”‚                โ–ผ                                    โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”   โ”‚
โ”‚  โ”‚ Fine-tuned LLM (Qwen2.5-Coder-7B)            โ”‚   โ”‚
โ”‚  โ”‚ - Documentation lookup                       โ”‚   โ”‚
โ”‚  โ”‚ - Intelligent suggestions                    โ”‚   โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜   โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Why this architecture?

  • Official Zig compiler (100% accurate, always up-to-date) instead of custom parser

  • System integration (uses existing Zig installation if available)

  • LLM-powered suggestions (get_zig_docs, suggest_fix) for intelligence

  • No external API calls (local inference via node-llama-cpp)

  • Fast (< 100ms for validation, < 2s for LLM suggestions)

Note: When Zig releases a new version (e.g., 0.16.0), ZigNet will need to re-train the LLM model on updated documentation and examples.


๐Ÿงช Development Status

Component

Status

Notes

Zig Compiler Wrapper

โœ… Complete

ast-check + fmt integration

System Zig Detection

โœ… Complete

Auto-detects installed Zig versions

Multi-version Cache

โœ… Complete

Downloads Zig 0.13-0.15 on demand

MCP Server

โœ… Complete

All 4 tools fully implemented

LLM Fine-tuning

โœ… Complete

Trained on 13,756 Zig examples

get_zig_docs

โœ… Complete

LLM-powered documentation lookup

suggest_fix

โœ… Complete

LLM-powered intelligent suggestions

GGUF Conversion

โœ… Complete

Q4_K_M quantized (4.4GB)

E2E Testing

โœ… Complete

27/27 tests passing (8.7s)

Claude Integration

โณ Planned

Final deployment to Claude Desktop

Current Phase: Ready for deployment - All core features complete


๐Ÿงช Testing

Running Tests

# Run all tests (unit + E2E)
pnpm test

# Run only E2E tests
pnpm test tests/e2e/mcp-integration.test.ts

# Run deterministic tests only (no LLM required)
SKIP_LLM_TESTS=1 pnpm test tests/e2e

# Watch mode for development
pnpm test:watch

Test Coverage

E2E Test Suite: 27 tests covering all MCP tools

Tool

Tests

Type

Pass Rate

analyze_zig

4

Deterministic

100%

compile_zig

3

Deterministic

100%

get_zig_docs

5

LLM-powered

100%

suggest_fix

5

LLM-powered

100%

Integration

3

Mixed

100%

Performance

3

Stress tests

100%

Edge Cases

4

Error paths

100%

Execution time: 8.7 seconds (without LLM model, deterministic only)
With LLM model: ~60-120 seconds (includes model loading + inference)

Test Behavior

  • Deterministic tests (12 tests): Always run, use Zig compiler directly

  • LLM tests (15 tests): Auto-skip if model not found, graceful degradation

  • CI/CD ready: Runs on GitHub Actions without GPU requirements

For detailed testing guide, see tests/e2e/README.md


๐Ÿ“ฆ Project Structure

zignet/
โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ config.ts             # Environment-based configuration
โ”‚   โ”œโ”€โ”€ mcp-server.ts         # MCP protocol handler
โ”‚   โ”œโ”€โ”€ zig/
โ”‚   โ”‚   โ”œโ”€โ”€ manager.ts        # Multi-version Zig download/cache
โ”‚   โ”‚   โ””โ”€โ”€ executor.ts       # zig ast-check + fmt wrapper
โ”‚   โ”œโ”€โ”€ llm/
โ”‚   โ”‚   โ”œโ”€โ”€ model-downloader.ts  # Auto-download GGUF from HuggingFace
โ”‚   โ”‚   โ””โ”€โ”€ session.ts           # node-llama-cpp integration
โ”‚   โ””โ”€โ”€ tools/
โ”‚       โ”œโ”€โ”€ analyze.ts        # analyze_zig tool (COMPLETE)
โ”‚       โ”œโ”€โ”€ compile.ts        # compile_zig tool (COMPLETE)
โ”‚       โ”œโ”€โ”€ docs.ts           # get_zig_docs tool (COMPLETE)
โ”‚       โ””โ”€โ”€ suggest.ts        # suggest_fix tool (COMPLETE)
โ”œโ”€โ”€ scripts/
โ”‚   โ”œโ”€โ”€ train-qwen-standard.py   # Fine-tuning script (COMPLETE)
โ”‚   โ”œโ”€โ”€ scrape-zig-repos.js      # Dataset collection
โ”‚   โ”œโ”€โ”€ install-zig.js           # Zig version installer
โ”‚   โ””โ”€โ”€ test-config.cjs          # Config system tests
โ”œโ”€โ”€ data/
โ”‚   โ”œโ”€โ”€ training/             # 13,756 examples (train/val/test)
โ”‚   โ””โ”€โ”€ zig-docs/             # Scraped documentation
โ”œโ”€โ”€ models/
โ”‚   โ””โ”€โ”€ zignet-qwen-7b/       # Fine-tuned model + LoRA adapters
โ”œโ”€โ”€ tests/
โ”‚   โ”œโ”€โ”€ *.test.ts             # Unit tests (lexer, parser, etc.)
โ”‚   โ””โ”€โ”€ e2e/
โ”‚       โ”œโ”€โ”€ mcp-integration.test.ts  # 27 E2E tests
โ”‚       โ””โ”€โ”€ README.md               # Testing guide
โ”œโ”€โ”€ docs/
โ”‚   โ”œโ”€โ”€ AGENTS.md             # Detailed project spec
โ”‚   โ”œโ”€โ”€ DEVELOPMENT.md        # Development guide
โ”‚   โ””โ”€โ”€ TESTING.md            # Testing documentation
โ””โ”€โ”€ README.md                 # This file

๐Ÿค– Model Details

Base Model: Qwen/Qwen2.5-Coder-7B-Instruct
Fine-tuning: QLoRA (4-bit) on 13,756 Zig examples
Dataset: 97% real-world repos (Zig 0.13-0.15), 3% documentation
Training: RTX 3090 (24GB VRAM), 3 epochs, ~8 hours
Output: fulgidus/zignet-qwen2.5-coder-7b (HuggingFace)
Quantization: Q4_K_M (~4GB GGUF for node-llama-cpp)

Why Qwen2.5-Coder-7B?

  • Best Zig syntax understanding (benchmarked vs 14 models)

  • Modern idioms (comptime, generics, error handling)

  • Fast inference (~15-20s per query post-quantization)


๐Ÿ“Š Benchmarks

Model

Pass Rate

Avg Time

Quality

Notes

Qwen2.5-Coder-7B

100%

29.58s

โญโญโญโญโญ

SELECTED - Best idioms

DeepSeek-Coder-6.7B

100%

27.86s

โญโญโญโญโญ

Didactic, verbose

Llama3.2-3B

100%

12.27s

โญโญโญโญ

Good balance

CodeLlama-7B

100%

24.61s

โญโญโญ

Confuses Zig/Rust

Qwen2.5-Coder-0.5B

100%

3.94s

โŒ

Invents syntax

Full benchmarks: scripts/test-results/


๐Ÿ› ๏ธ Development

# Run tests
pnpm test

# Run specific component tests
pnpm test -- lexer
pnpm test -- parser
pnpm test -- type-checker

# Watch mode
pnpm test:watch

# Linting
pnpm lint
pnpm lint:fix

# Build
pnpm build

๐Ÿค Contributing

See AGENTS.md for detailed project specification and development phases.

Current needs:

  • Testing on diverse Zig codebases

  • Edge case discovery (parser/type-checker)

  • Performance optimization

  • Documentation improvements


๐Ÿ“„ License

WTFPL v2 โ€” Do What The Fuck You Want To Public License



Status: โœ… Phase 4 Complete - Ready for deployment (fine-tuning complete, E2E tests passing)

Available Tools

4 tools
analyze_zigB

Analyze Zig code for syntax errors, type mismatches, and semantic issues using the official Zig compiler

NameRequiredDescriptionDefault
codeYesZig source code to analyze
zig_versionNoZig version to use for validation (default: 0.15.2)

TDQS

B3.1/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It discloses the analysis backend (official Zig compiler), which is a useful hint, but says nothing about whether code is executed, whether analysis is read-only, whether it can be slow, or what permissions/network access it needs. For a tool that runs untrusted source through a compiler, the safety profile is conspicuously absent.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single front-loaded sentence with no filler; the purpose and scope are stated immediately and nothing is wasted.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

There is no output schema, so the description should ideally sketch the shape of the result (diagnostics list, severity, line numbers) and confirm whether code is executed. It covers the input side adequately but leaves the return contract and safety posture to inference.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100% with only two parameters, so the schema already documents both code and the zig_version enum including its default. The description adds no format or behavioral detail beyond that, which matches the baseline 3 for schema-covered parameters.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a specific verb (Analyze), resource (Zig code), the classes of issues detected (syntax errors, type mismatches, semantic issues), and the mechanism (official Zig compiler). That is stronger than a bare restatement. However, it does not distinguish itself from the sibling compile_zig, which an agent could easily confuse with an analysis tool.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no statement of when to use this tool rather than compile_zig or suggest_fix, no prerequisites, and no exclusions. The agent must infer the routing decision entirely from the tool names.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

compile_zigC

Format Zig code using the official Zig formatter

NameRequiredDescriptionDefault
codeYesZig source code to format
zig_versionNoZig version to use for formatting (default: 0.15.2)

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden, and it discloses almost nothing: no statement that formatting preserves semantics (unlike the name's 'compile' implication), no idempotency, no error behavior for invalid Zig, no output format. It does at least clarify the operation is formatting rather than compiling, which is the one behavioral correction present.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single short sentence with zero filler, front-loading the action and the resource. It is efficient, though its brevity shades into under-specification rather than pure concision.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a two-parameter, fully documented schema with no output schema, the description is minimally viable: it identifies the operation and the formatter used. It leaves the compile-vs-format naming ambiguity unresolved and says nothing about what the tool returns or how errors surface.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so both 'code' and the enumerated 'zig_version' (with its default) are already fully documented in the schema. The description adds no syntax, size-limit, or version-selection guidance beyond that, so the baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Format Zig code') plus the mechanism ('official Zig formatter'), which distinguishes it from analyze_zig, get_zig_docs, and suggest_fix, none of which format. The only friction is that the tool name 'compile_zig' implies compilation while the description says formatting, which could momentarily confuse an agent matching name to behavior.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no when-to-use guidance, no exclusions, and no routing to alternatives such as suggest_fix when code needs semantic changes rather than reformatting. Usage is only inferable from the purpose statement itself.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_zig_docsC

Retrieve Zig documentation for specific topics

NameRequiredDescriptionDefault
topicYesTopic to get documentation for (e.g., 'comptime', 'generics')

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It does not say whether docs are bundled locally or fetched remotely, what happens for an unknown or ambiguous topic, or what the response shape looks like โ€” meaningful gaps for a retrieval tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single front-loaded sentence with no filler or redundancy. It is efficient, though its brevity leaves substance for other dimensions to penalize.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool is simple (one required parameter, no output schema), so the bar is low, but the description still omits return format, topic matching behavior, and error handling for invalid topics. Adequate but with clear gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100% and the schema already supplies the parameter description plus examples ('comptime', 'generics'). The description adds no syntax, matching behavior, or format detail beyond the schema, so the baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Retrieve Zig documentation'), which is clearly distinct from the action-oriented siblings (compile_zig, analyze_zig, suggest_fix). However, it does not explicitly contrast itself with those siblings, so it falls short of a 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no guidance on when to use this tool versus the siblings, nor any exclusions or prerequisites. The agent must infer that this is a static documentation lookup rather than an analysis or compilation action.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

suggest_fixC

Get intelligent suggestions for fixing Zig code errors

NameRequiredDescriptionDefault
codeYesCode context where the error occurred
errorYesError message to get fix suggestions for

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. 'Get ... suggestions' weakly implies a non-mutating read, but nothing states whether fixes are returned as text, as patches, or applied, and there is no mention of latency, rate limits, or side effects. For a tool with zero annotation coverage this is a meaningful gap.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single short sentence with the resource and purpose front-loaded and zero filler. It is efficient, though its brevity contributes to the gaps noted elsewhere.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema and no annotations, the description should at least hint at what a suggestion looks like and whether it modifies anything. For a two-parameter tool the surface is small, but the agent is left guessing about the return value and side effects.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, with both parameters documented in the schema itself, so the baseline of 3 applies. The description adds no additional semantics about how 'error' and 'code' should relate or what format they take.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb (suggest fixes) and resource (Zig code errors), so the agent knows this is a suggestion-generation tool rather than a compiler or analyzer. It does not explicitly distinguish itself from the closest sibling analyze_zig, which could plausibly also surface error information, so it stops short of a 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no when-to-use guidance, no ordering relative to compile_zig or analyze_zig, and no mention of prerequisites such as the code having already been compiled or an error actually existing. The agent must infer the workflow entirely.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 4 tool updatesv0.15.2-i
    • First observedanalyze_zig
    • First observedcompile_zig
    • First observedget_zig_docs
    • First observedsuggest_fix

TDQS

B3.2/5.0

Scored across 4 tools

Disambiguation3/5

analyze_zig and suggest_fix have related but distinct roles (detection vs. remediation), and get_zig_docs is clearly separate. However, compile_zig is named as if it compiles code but actually formats it, creating a strong misselection risk that descriptions only partially mitigate.

Naming Consistency5/5

All four tool names follow a consistent snake_case verb_noun pattern: analyze_zig, compile_zig, get_zig_docs, suggest_fix. There is no mixing of styles or conventions.

Tool Count4/5

Four tools is a reasonable, focused set for a Zig code assistance server and falls within the typical 3-15 range. It is slightly thin for the domain, but each tool still addresses a plausible need.

Completeness3/5

The set covers analysis, formatting, documentation lookup, and fix suggestions. However, actual compilation is missing, and the tool named compile_zig does not compileโ€”a notable gap for a Zig coding assistant.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    F
    maintenance
    Provides Zig language tooling and code analysis, enhancing AI capabilities with Zig-specific functions like code optimization, compute unit estimation, code generation, and recommendations for best practices.
    7
    51
    MIT
  • F
    license
    Not graded
    quality
    D
    maintenance
    MCP server for Zig that connects AI coding assistants to ZLS (Zig Language Server) via LSP. Provides 16 tools for code intelligence (hover, go-to-definition, references, completions, diagnostics, rename, format) and build/test operations.
    7
    -
  • A
    license
    Not graded
    quality
    C
    maintenance
    Provides up-to-date Zig standard library and builtin function documentation via MCP tools, using local Zig installation or remote ziglang.org sources.
    27 npm
    173
    MIT
  • A
    license
    A
    quality
    D
    maintenance
    Provides Zig language intelligence for Claude Code by wrapping ZLS (Zig Language Server) and exposing 8 tools for diagnostics, formatting, hover info, go-to-definition, references, completions, document symbols, and building.
    8
    6 npm
    2
    MIT