Skip to main content
Glama

civil3d_query

Execute C# code to query Civil 3D data in read-only mode: list objects, retrieve properties, analyze surfaces, and more, without saving changes.

Instructions

Execute C# code in Civil 3D in READ-ONLY mode (no changes saved). Available globals: Document, CivilDoc, Database, Transaction, Editor. 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;
Behavior4/5

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

With no annotations, the description carries the full burden. It clearly states READ-ONLY mode and lists available globals (Document, CivilDoc, Database, Transaction, Editor) and notes that all Civil 3D namespaces are auto-imported. It also explains how to return results as JSON. However, it does not mention error handling, performance implications, or any limitations.

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?

The description is concise with three sentences, each serving a distinct purpose: stating the read-only mode, listing globals, and providing usage guidance. There is no redundant or unnecessary information.

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

Completeness5/5

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

Given the tool's complexity (code execution) and single parameter, the description covers all needed aspects: read-only guarantee, available globals, auto-imported namespaces, and how to return results. No output schema exists, but the description explains the JSON return format. It is complete for safe and correct usage.

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

Parameters4/5

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

There is only one parameter 'code' with a schema description that includes an example. The description adds value by specifying the available globals and auto-imported namespaces, which are not in the schema. Since schema coverage is 100%, baseline is 3, but the added context justifies a 4.

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?

The description clearly states the tool executes C# code in Civil 3D in READ-ONLY mode, with a specific verb and resource. It distinguishes from siblings by emphasizing read-only querying vs. execution, and the sibling names (civil3d_execute, civil3d_skills) further clarify the differentiation.

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?

The description explicitly says 'Use this for querying data: listing objects, getting properties, analyzing surfaces, etc.' This provides clear when-to-use guidance. It does not explicitly state when not to use it, but the READ-ONLY mode and sibling names imply it is not for modifications. A small gap in not naming the alternative directly.

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/barbosaihan/civil3d-mcp'

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