Skip to main content
Glama
SantosSjba

Civil 3D MCP Server

by SantosSjba

civil3d_query

Execute read-only C# code in Civil 3D to query data such as surface properties, alignment information, and object lists. Returns results as JSON for analysis.

Instructions

Execute C# code in Civil 3D in READ-ONLY mode (no changes saved). Available globals: Document/Doc, CivilDoc/Civil, Database, Transaction/Tr, Editor. Helpers: GetSurfaceByName, GetAlignmentByName, ListSurfaces, ListAlignments, ListCogoPoints. All Civil 3D namespaces are auto-imported. Return a value to get results as JSON. Use this for querying data: listing objects, getting properties, analyzing surfaces, etc.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYesC# code to query data. Has access to Document, CivilDoc, Database, Transaction, Editor. Example: var surfaces = new List<object>(); foreach (ObjectId id in CivilDoc.GetSurfaceIds()) { var s = Transaction.GetObject(id, OpenMode.ForRead) as TinSurface; surfaces.Add(new { s.Name, s.Layer }); } return surfaces;
timeoutMsNoMax execution time in ms (default: 120000)
Behavior4/5

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

No annotations provided, so description carries burden. Clearly states read-only behavior, available globals (Doc, CivilDoc, Database, etc.), helpers, and auto-imported namespaces. Does not cover error handling or timeout behavior in detail, but safety is well addressed.

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?

Description is front-loaded with key constraint (READ-ONLY), then lists globals/helpers, example usage, and ends with clear purpose statement. Efficient at ~100 words, no fluff.

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

Completeness4/5

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

For a query tool with no output schema, description explains return format (JSON if value returned) and available context (globals, helpers). Covers all essential aspects for agent to use tool correctly. Could mention error responses but overall complete.

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

Parameters5/5

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

Schema coverage 100% but description adds significant value: explains what globals and helpers are available, provides a C# example for the code parameter, and gives default timeout (120000 ms). This greatly aids the agent in crafting correct inputs.

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

Purpose5/5

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

Description clearly states the tool executes C# code in Civil 3D in READ-ONLY mode, with specific verb 'Execute' and resource 'C# code in Civil 3D'. It distinguishes from siblings like civil3d_execute (likely write) and civil3d_command (different execution style).

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

Usage Guidelines4/5

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

Explicitly says 'Use this for querying data' and lists examples. Implies not for modifications, but does not explicitly state when not to use or mention alternatives like civil3d_execute for write operations.

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

Install Server

Other Tools

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/SantosSjba/mcp-to-c3d'

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