cg-agent-kit
This MCP server lets an AI agent design FPGA hardware in C⏚ — compile, validate, simulate, synthesize, and document designs against real tooling.
Compile and validate C⏚:
cg_checkparses/scopes/type-checks source and returns structured diagnostics with file/line and fix suggestions.Generate HDL:
cg_generate_verilogemits synthesizable Verilog (or VHDL), optionally writing files to disk.Simulate designs:
cg_simulateruns bytecode or Icarus Verilog simulation, self-checks viaproperties { test: ... }, and reports PASS/FAIL.Synthesize with Yosys:
cg_synthgives a REAL/FOLDED/SUSPECT/ERROR verdict, cell counts, latch/arith warnings, and optional FPGA vendor flows.Get verified starting code:
cg_examplereturns scored, validated C⏚ patterns to seed-and-adapt from.Turn errors into fixes:
cg_suggest_for_errormaps compiler errors to demonstrated recipes.Inspect internals:
cg_fsmshows compiled state machines;cg_graphshows network graphs/wiring.Fetch documentation:
cg_docsserves C⏚ language and CPU-pattern references.Build an FPGA report:
cg_reportaggregates simulation and synthesis results into a self-contained HTML report.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@cg-agent-kitcompile and check this C⏚ design for errors"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
cg-agent-kit - an MCP server for FPGA design in C⏚
Give an AI agent the ability to design real hardware. cg-agent-kit is a
Model Context Protocol server that drives the
open-source C⏚ Verilog compiler - so an agent writes a C-like HDL, and the
server compiles, checks, generates Verilog, and synthesis-checks it against the
real toolchain instead of hallucinating Verilog that doesn't build.
C⏚ ("C-Ground") is a hardware description language with C-like syntax that compiles to clean, standard Verilog. The compiler is open source at github.com/Neosyn-Logic/cg-compiler.
Tools
Tool | What it does |
| Compile + validate C⏚; structured diagnostics (file:line, the fix) |
| Emit synthesizable Verilog |
| Simulate a design ( |
| Yosys-synthesize the Verilog: REAL / FOLDED / SUSPECT verdict + cell count |
| Scored lookup into a curated, validated-code dictionary (28 entries) |
| Map a compiler error to the recipe with the fix pattern |
| A task's compiled state machine / a network's graph |
| C⏚ language + patterns reference |
The kit's organizing idea: agents seed-and-adapt from validated code and verify against the real compiler at every step - not invent-from-scratch.
Related MCP server: EDA Tools MCP Server
Open vs commercial
This kit and the compiler it drives are open. The fast (bytecode) cycle-accurate
simulator is part of the commercial Neosyn SDK - so cg_simulate's default
bytecode backend asks you to upgrade, while the iverilog backend works
fully (generate Verilog + run Icarus Verilog). Everything else -
check, generate, synth, the dictionary, docs - runs entirely on the open compiler.
More at neosyn.io/open.
Install
pip install cg-agent-kitThen point it at a built C⏚ compiler jar (download the prebuilt jar from cg-compiler releases, or build from source):
export CG_JAR=/path/to/cg-language-server.jar(Optional, for cg_synth and the iverilog sim backend, install yosys and
iverilog.)
Run
As an MCP server (for Claude Desktop, Cursor, Windsurf, or any MCP client):
cg-mcp-serverAdd it to your MCP client config, e.g.:
{
"mcpServers": {
"cg": { "command": "cg-mcp-server", "env": { "CG_JAR": "/path/to/cg-language-server.jar" } }
}
}Or call the verification functions directly from Python:
from cg_agent_kit import cg_mcp_server as cg
print(cg.check(open("Counter.cg").read()))
print(cg.generate(open("Counter.cg").read()))The kit bundles 28 validated C⏚ designs and the language + CPU-pattern
references the cg_docs tool serves.
License
MIT - see LICENSE. C⏚ began as the Synflow Cx toolchain.
Available Tools
10 toolscg_checkA
Parse, scope, and type-check C⏚ source without running it. Returns
{ok, diagnostics:[{file,line,message}], summary}. Call this first on
any draft; fix every diagnostic before simulating. extra_files maps
filename → content for imported bundles/tasks (e.g. {"Defs.cg": "..."}).
For a MULTI-FILE project, pass package_dir (the folder holding your
.cg files, e.g. "fpga/src/main/cg", relative to the project root): the
tool then reads every sibling .cg there, so tasks defined in other files
of the same package resolve — just like the IDE. A task you only got from
cg_example is text; it must be saved to a file in that dir to resolve.
| Name | Required | Description | Default |
|---|---|---|---|
| source | Yes | ||
| extra_files | No | ||
| package_dir | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Discloses read-only behavior, return format (ok, diagnostics, summary), and parameter effects. No annotations exist, so description bears full burden. Does not mention performance or rate limits, but sufficient for static analysis tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Single paragraph packs essential information. Front-loads purpose. Slightly dense but no wasted words. Could benefit from structured formatting for readability, but overall concise.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Handles both simple and multi-file usage, explains return format, and warns about tasks from cg_example needing file storage. No output schema exists, but description covers everything needed for correct invocation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema has 0% description coverage, but description compensates fully: explains source is required, extra_files maps filename to content for imports, and package_dir is relative project folder for multi-file projects. Adds crucial context beyond schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Clearly states the tool parses, scopes, and type-checks source without running it, distinguishing it from siblings like cg_simulate (execution) and cg_suggest_for_error (error-specific). Includes return format and usage context.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly advises calling this first on any draft and fixing diagnostics before simulating. Explains when to use extra_files and package_dir. Lacks explicit exclusions but context is clear given sibling tools.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
cg_docsA
Fetch a markdown knowledge doc. No topic → an index of available topics with descriptions; a topic → its full content. Topics: 'context' (the core C⏚ language pack — load before writing any Cg) and 'riscv' (the worked RV32I CPU reference: the loadable single-cycle core and the reusable patterns for CPU-shaped hardware in Cg — barrel shifter, signed/unsigned widening, sub-word load/store, count-prefixed boot-stream program loading, and the lossless-capture / address-filtered testbench patterns). Read 'riscv' when building or extending a processor, instruction decoder, datapath, or stack machine.
| Name | Required | Description | Default |
|---|---|---|---|
| topic | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, so description carries full burden. Clearly states the read-only behavior: fetches docs, returns index or full content depending on topic. Does not mention error cases or response format, but for a doc-fetching tool this is acceptable.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Front-loaded with the core action. Every sentence adds value, but the bullet-style topic list could be slightly more concise. Still well-organized and informative.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the simple parameter set (one optional string, no enums, no output schema), the description covers all necessary context: behavior, parameter semantics, and topic choices. No missing information for effective use.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema has 0% description coverage and one parameter 'topic'. The description exhaustively explains its meaning, including the effect of omitting it (index) vs. providing a topic (full content), and enumerates the valid topic values with detailed content summaries.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Describes a specific verb 'Fetch' and resource 'markdown knowledge doc'. Clearly distinguishes behavior for no topic vs. a topic. Sibling tools are all other operations (check, generate, simulate), so this tool's role as a documentation retriever is unambiguous.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Provides explicit context for when to use the 'riscv' topic ('when building or extending a processor...'). Implies usage for 'context' as core language pack. Does not explicitly state when not to use or suggest alternatives, but given the tool's unique role, this is a minor gap.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
cg_exampleA
Get a VERIFIED C⏚ base to seed-and-adapt from (don't synthesize hard
kernels from scratch — adapt a known-good one). This is a curated
dictionary of validated code with scored lazy lookup, NOT free-form
search. No pattern → a compact index (name + kind + use_when + tags). A
pattern → the single best-matching source plus its metadata and 1-2
runners_up so you can self-correct on an ambiguous query. k>1 also
returns the next sources when the task implies composition.
Matching is specificity-weighted (exact name ≫ name word ≫ full tag
phrase ≫ partial overlap), so e.g. "1/sqrt" → RSqrt while a bare "sqrt"
→ FixedSqrt. kind distinguishes general PRIMITIVES (the reusable
library: Recip, Divide, SeqDiv, FixedSqrt, RSqrt, SqrDist, DotProduct,
Fir, Integ, Distance, Counter) from application EXAMPLES (Force,
GalaxyForce). Every entry passes simulate + generate + iverilog + yosys.
Workflow: cg_example → edit only the dataflow → cg_check → cg_simulate →
cg_generate_verilog → cg_synth.
| Name | Required | Description | Default |
|---|---|---|---|
| k | No | ||
| pattern | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description bears full burden. It discloses that the tool is a curated dictionary, not free-form search; describes return formats for no pattern and with pattern; explains matching specificity-weighted logic; distinguishes entry kinds; and states verification status. It does not cover auth, rate limits, or error behavior, but is comprehensive for a read-only lookup tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is somewhat long but every sentence adds value. It is front-loaded with purpose and then details behavior. Some redundancy could be trimmed, but overall well-structured for the complexity of the tool.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the absence of output schema and only two parameters, the description is thorough: it explains input behavior (no pattern vs pattern), output format (compact index or best match plus runners-up), matching algorithm, entry types, verification status, and a workflow. No significant gaps remain.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must fully explain parameters. It does: 'pattern' is described in detail with matching behavior and examples (e.g., '1/sqrt' vs 'sqrt'); 'k' is explained as controlling the number of returned sources, with k>1 for composition. This adds rich meaning beyond the bare schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states it retrieves a verified C⏚ base for seeding and adaptation, contrasting with synthesizing from scratch. It explains it's a curated dictionary with scored lazy lookup, not free-form search. This verb+resource combination is specific and distinguishes it from sibling tools like cg_check, cg_simulate, etc.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides a workflow (cg_example → edit → cg_check → cg_simulate → cg_generate_verilog → cg_synth) and advises against synthesizing hard kernels from scratch. It implies when to use this tool (to get a verified base) and when not to (when free-form search is needed), but does not explicitly name alternatives for specific tasks.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
cg_fsmC
Show a task's compiled state machine (states + transitions). Useful to confirm an FSM has the intended number of states.
| Name | Required | Description | Default |
|---|---|---|---|
| task | No | ||
| source | Yes | ||
| extra_files | No |
TDQS
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 states it 'shows' information but does not disclose whether it is read-only, if it requires compilation, or error conditions. Minimal behavioral context.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two short sentences, no fluff. First sentence states the primary action, second provides a use case. Efficiently structured.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With 3 parameters and no output schema, the description should explain parameters and prerequisites. It lacks this information, making it incomplete for an agent to use effectively.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Input schema has 3 parameters with 0% description coverage. The description adds no meaning about 'source', 'task', or 'extra_files', leaving the agent to infer from parameter names only.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description clearly states the tool shows a task's compiled state machine (states+transitions), distinguishing it from siblings like cg_graph or cg_report. However, it could be more explicit about the context (e.g., hardware tasks).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Provides a specific use case: 'confirm an FSM has the intended number of states'. No mention of when to avoid using it or alternatives among siblings.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
cg_generate_verilogA
Generate synthesizable HDL from C⏚. target is 'verilog' (default) or 'vhdl'. Returns {ok, file_count, files:{path:content}}. Use after cg_simulate passes, to hand off RTL.
Pass output_dir (e.g. "fpga/build/verilog", relative to the project
root) to WRITE the files to disk and KEEP them — the result then also
carries {output_dir, written:[paths]}. Without it the files are only
returned inline and the temp dir is cleaned. Prefer output_dir when
the host needs the .v on disk (to inspect or run yosys).
For a MULTI-FILE project, pass package_dir (the folder with your .cg
files) so sibling tasks in the same package resolve during generation.
| Name | Required | Description | Default |
|---|---|---|---|
| source | Yes | ||
| target | No | verilog | |
| output_dir | No | ||
| extra_files | No | ||
| package_dir | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Discloses return format, file writing vs inline behavior, and temp directory cleanup. Lacks info on overwrite behavior or permissions, but covers main behavioral traits well.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Three well-focused paragraphs. Front-loaded with purpose, then parameter details. No redundant sentences. Efficient and readable.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Covers main functionality, return values, key parameters, and usage context. Lacks details on source format or error handling, but sufficient for an agent.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
With 0% schema coverage, description explains target, output_dir, and package_dir clearly. Source is implied but not explicitly described. extra_files not mentioned. Good but not complete.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states 'Generate synthesizable HDL from C⏚' and specifies target languages. It distinguishes from siblings by positioning as the step after cg_simulate passes.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly says 'Use after cg_simulate passes, to hand off RTL.' Provides when to use output_dir vs not, and package_dir for multi-file projects. Clear context for appropriate use.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
cg_graphB
Show a network's compiled graph (instances, ports with widths and interfaces, connections). Useful to confirm wiring.
| Name | Required | Description | Default |
|---|---|---|---|
| source | Yes | ||
| network | No | ||
| extra_files | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, and the description gives no information about side effects, permissions, or whether the operation is read-only. The tool appears to be a read operation, but this is not explicitly stated.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise, consisting of two short sentences that front-load the main purpose. However, it sacrifices necessary parameter details for brevity, earning a slightly lower score.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool has three parameters with no descriptions in the schema, no output schema, and no annotations, the description is inadequate. It lacks details on parameter usage, return values, and ties to sibling tools.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
With 0% schema description coverage, the description should explain what parameters like 'source', 'network', and 'extra_files' mean in the context of the tool. It does not, leaving the agent to guess their purpose.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool shows a network's compiled graph, listing specific elements like instances, ports, widths, interfaces, and connections. This distinguishes it from sibling tools like cg_synth or cg_simulate.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description notes it is 'useful to confirm wiring', providing a clear use case. However, it does not mention when not to use it or suggest alternative tools for other tasks.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
cg_reportA
Finalize the FPGA report: (re)render /report.html — a self-contained HTML with the synthesis table (REAL/FOLDED/SUSPECT verdict
cell/arith/latch counts), the simulation PASS/FAIL + output, the generated-Verilog file list, and (best-effort) datapath schematic SVGs.
This does NO synthesis — the rows are built incrementally by passing the
SAME report_dir to cg_synth (per kernel) and cg_simulate as you run
them; cg_report just aggregates those fragments + the Verilog under
/verilog and renders. Workflow:
cg_generate_verilog(output_dir="/verilog", package_dir=...)
cg_simulate(..., report_dir="")
cg_synth(..., report_dir="") # once per kernel
cg_report(report_dir="") # finalize + schematics
Returns {ok, report (the .html path), kernels, sim_ok, message}. Set
schematics=False to skip the SVGs (faster).
| Name | Required | Description | Default |
|---|---|---|---|
| report_dir | No | fpga/build | |
| schematics | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description must carry the full behavioral burden. It transparently states that cg_report does NO synthesis, only aggregates existing fragments. It discloses the return object with fields like ok, report, kernels, sim_ok, message, and notes that schematics are 'best-effort'. This exceeds what's required.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is front-loaded with the main purpose and then provides a workflow and return value summary. It is slightly lengthy due to the workflow explanation, but every sentence adds value and the structure is logical.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given only 2 parameters, no output schema, and a clear set of sibling tools, the description is fully adequate. It explains the tool's role, dependencies, parameter effects, and output, leaving no obvious gaps for an agent to misinterpret.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
With 0% schema description coverage, the description provides essential parameter semantics: report_dir defaults to 'fpga/build', schematics defaults to true and setting it to false skips SVG generation. This adds significant meaning beyond the raw schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states that cg_report finalizes an FPGA report by rendering a self-contained HTML with synthesis table, simulation results, Verilog file list, and datapath SVGs. It distinguishes itself from siblings by noting it aggregates fragments from cg_synth and cg_simulate, not performing synthesis itself.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides a clear workflow showing the correct order: cg_generate_verilog, cg_simulate, cg_synth, then cg_report. It also notes that setting schematics=False skips SVGs for faster execution. However, it doesn't explicitly state when not to use it or compare to other sibling tools beyond the implied workflow.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
cg_simulateA
Simulate C⏚ source. Returns {ok, simulator, timed_out, diagnostics,
output}. output holds port values and print() lines; a
properties { test: {...} } block self-checks and fails the run on
mismatch. This is the ground-truth correctness check — iterate until
ok is true.
simulator picks the backend: 'bytecode' (default — the compiler's
fast simulator, no HDL toolchain) or 'iverilog' (generate Verilog +
testbench and run Icarus Verilog, a Verilog-level cross-check; needs a
network <Name>_test). 'verilator' is accepted but reported
unavailable unless installed.
For a MULTI-FILE project, pass package_dir (the folder with your .cg
files, e.g. "fpga/src/main/cg") so every sibling task in the same package
resolves — a cg_example you pulled must be saved to a file in that dir,
not just referenced.
report_dir DEFAULTS to "fpga/build" — this run's PASS/FAIL + output is
recorded into that dir's accumulating report.html (see cg_report). Pass
report_dir="" to disable.
| Name | Required | Description | Default |
|---|---|---|---|
| source | Yes | ||
| timeout | No | ||
| simulator | No | bytecode | |
| report_dir | No | fpga/build | |
| extra_files | No | ||
| package_dir | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description fully discloses behavioral traits: return values (ok, simulator, timed_out, diagnostics, output), self-check blocks that fail on mismatch, and simulator availability conditions. No contradictions.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is well-structured with front-loaded return structure and separate sections for simulator options and multi-file projects. It is informative without being overly verbose, though could be slightly more concise.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the complexity (6 params, no output schema, no annotations), the description covers main use cases, return values, and configuration. Missing details on 'extra_files' and exact format of 'source', but overall provides sufficient context for an agent.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0%, so the description carries the burden. It explains source (implied), simulator (choices and requirements), report_dir (default and disable), and package_dir (multi-file usage). Timeout and extra_files are less explained, but key parameters are well covered.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool simulates a C⏚ source and details the return structure. It distinguishes itself from siblings like cg_generate_verilog or cg_synth by focusing on simulation and correctness checking.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides guidelines on when to use built-in bytecode or Verilog simulators, notes dependencies for iverilog and verilator, and explains multi-file projects. It does not explicitly contrast with all siblings but gives clear context for iterative testing.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
cg_suggest_for_errorA
Map a compiler error/diagnostic to the recipe that demonstrates the
synthesizable pattern for what was rejected. Returns {ok, recipe, hint,
source}. div/shift-by-a-variable → Recip (bit-serial long division);
a data-dependent/runtime loop bound → SeqDiv (sequential FSM divider).
cg_check/cg_simulate/cg_generate_verilog already auto-attach this as a
suggestion when a diagnostic matches; call this directly to look one up.
| Name | Required | Description | Default |
|---|---|---|---|
| message | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description discloses the return format ({ok, recipe, hint, source}) and provides examples of mappings, giving insight into behavior. It could mention what happens if no match is found, but the examples are helpful.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise (three sentences), front-loaded with the main purpose, followed by examples and usage context. Every sentence adds value without redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity (one parameter, no output schema, no annotations), the description covers purpose, usage, return format, and examples. It is mostly complete, though it could explicitly state behavior for unmatched inputs.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The single required parameter 'message' is described as a compiler error/diagnostic, with examples of specific error patterns. Since the schema has 0% description coverage, the description compensates by adding meaning beyond the type definition.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: mapping a compiler error/diagnostic to a recipe demonstrating a synthesizable pattern. It uses specific verbs and examples (e.g., 'div/shift-by-a-variable → Recip') to illustrate the mapping, and distinguishes from sibling tools by noting that some auto-attach suggestions.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explains that other tools (cg_check, etc.) already auto-attach suggestions, so this tool is for direct lookup when needed. This provides clear context for when to use it, though it does not explicitly state when not to use it.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
cg_synthA
Synthesize the generated Verilog with yosys — the strongest signal
that a design maps to real hardware (catches non-synthesizable
constructs that simulate/iverilog accept). Returns {ok, verdict, top,
flow, cells, arith_ops, latches, warnings, stat, problems, output}.
verdict is the one-word classification so you can't confabulate
success: REAL (a genuine datapath), FOLDED (0 datapath cells — inputs
weren't on ports, dead hardware), SUSPECT (latches inferred — a
data-dependent loop / missing reset), or ERROR (yosys failed). cells
is the gate count; problems lists any ERROR/Warning lines.
warnings flags the two silent failure modes: a DEGENERATE datapath
(arith_ops == 0 → the design constant-folded; drive it with input
ports) and inferred LATCHES (latches > 0 → a data-dependent loop bound
or incomplete assignment; expected a clocked FSM). A clean synth has
ok: true, a sensible cells, arith_ops > 0, and empty warnings.
NOT a correctness oracle: a REAL verdict means real (synthesizable)
hardware, NOT correct hardware — it can't tell a good sequential FSM
from a buggy one. cg_simulate (the asserting test network) is the
correctness check; run it FIRST, then cg_synth to confirm the hardware
is real, not folded or latched.
top defaults to the first non-testbench task/network (the DUT); pass
it when a file holds several designs. flow selects the synthesis
flow: 'generic' (default, portable check) or a vendor FPGA family —
'ice40', 'ecp5', 'xilinx', 'gowin', 'intel' — to map to that part's
primitives. Override the yosys binary with the $YOSYS env var. Run
after cg_simulate passes. A constant-bound for synthesizes (it's
unrolled); a data-dependent loop becomes an FSM (also fine).
report_dir DEFAULTS to "fpga/build", so each synth automatically records
THIS kernel's verdict + cell counts as a row in /report.html —
synthesizing the kernels builds the whole report as a byproduct, no
separate step (see cg_report). Pass report_dir="" to disable.
| Name | Required | Description | Default |
|---|---|---|---|
| top | No | ||
| flow | No | generic | |
| source | Yes | ||
| timeout | No | ||
| report_dir | No | fpga/build | |
| extra_files | No | ||
| package_dir | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description fully shoulders the burden. It details the return value structure (ok, verdict, top, flow, cells, etc.), explains failure modes (FOLDED, SUSPECT, ERROR), and warns about silent failures (warnings for degenerate datapath and latches). It also notes the default report_dir behavior and how to disable it, offering comprehensive behavioral insight.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is long but well-structured, starting with purpose, then return value, usage warnings, parameter details, and defaults. Every sentence provides useful information. While it could be slightly more concise, the detail is justified given the tool's complexity.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's complexity (synthesis, 7 parameters, rich output) and lack of output schema and annotations, the description is quite complete. It thoroughly explains return values, failure modes, usage order relative to siblings, and key parameters. It misses explanations for a few parameters (timeout, extra_files, package_dir), but overall provides sufficient context for correct invocation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0%, so the description must add meaning. It explains key parameters: top (defaults to first non-testbench task), flow (lists options like generic, ice40, etc.), and report_dir (defaults to 'fpga/build', can disable with ''). However, it does not cover all 7 parameters; missing explanations for source, timeout, extra_files, and package_dir. Still, it adds significant context beyond the schema for the most critical parameters.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: 'Synthesize the generated Verilog with yosys — the strongest signal that a design maps to real hardware.' It explicitly distinguishes from cg_simulate, which checks correctness, and explains what each verdict means, making the purpose unambiguous.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides explicit usage guidance: 'Run after cg_simulate passes.' It clarifies that the tool is not a correctness oracle and directs to cg_simulate for that. It also gives advice on when to adjust parameters like top and flow, and how to interpret results to know if the tool was used correctly.
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. Dates show when Glama detected each change.
10 tool updates
v0.1.1- First observed
cg_check - First observed
cg_docs - First observed
cg_example - First observed
cg_fsm - First observed
cg_generate_verilog - First observed
cg_graph - First observed
cg_report - First observed
cg_simulate - First observed
cg_suggest_for_error - First observed
cg_synth
TDQS
Each tool targets a distinct stage in the C⏚ hardware design workflow: type-checking, documentation, example retrieval, FSM analysis, HDL generation, graph visualization, reporting, simulation, error-to-recipe mapping, and synthesis. No overlaps are apparent.
All tools share the 'cg_' prefix. Most follow a verb_noun pattern (e.g., cg_check, cg_generate_verilog, cg_simulate), but a few use nouns alone (cg_docs, cg_example, cg_fsm, cg_graph). This minor inconsistency slightly reduces clarity but remains acceptable.
With exactly 10 tools, the set is well-scoped for a hardware design assistant. It covers the full front-to-back workflow without being overwhelming or too sparse.
The tool surface provides complete lifecycle coverage: code checking, example retrieval, simulation, synthesis, Verilog generation, report finalization, plus supplementary tools for debugging (FSM, graph) and error guidance. No obvious gaps for the stated purpose.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Run, build, and validate firmware on virtual hardware from your AI agent. Hardware knowledge corpus.
Architecture compiler for AI code. 11 tools, 92 actions, 872 Lean4 proofs, 100/100 self-cert.
Build, validate, and deploy multi-agent AI solutions from any AI environment.
Production-readiness for your AI coding agents.
Related MCP Servers
- AlicenseAqualityDmaintenanceProvides AI assistants with a complete FPGA toolchain for HDL linting, simulation, synthesis, and place-and-route across various hardware targets. It features a GitHub-backed IP core registry that enables users to search for and import MIT-licensed cores directly through their chat interface.151MIT
- FlicenseAqualityDmaintenanceEnables AI assistants to perform Electronic Design Automation (EDA) tasks including Verilog synthesis, simulation, ASIC design flows, and waveform analysis through a unified interface.6-
- FlicenseNot gradedqualityBmaintenanceEnables LLMs to interact with hardware designs (Verilog/SystemVerilog), formal verification tools, waveform logs, protocol specifications, and bug databases through 34 structured tools.-
- AlicenseAqualityBmaintenanceEnables AI agents to formally verify constant-time, masking, and patch completeness properties of Verilog hardware designs, providing concrete leakage signals and next-step guidance.12Apache 2.0
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/Neosyn-Logic/cg-agent-kit'
If you have feedback or need assistance with the MCP directory API, please join our Discord server