Skip to main content
Glama
niknarra

x3d-mcp

by niknarra

x3d_modify_node

Update X3D node attributes by DEF name with a JSON of field changes, then retrieve the complete modified XML document.

Instructions

Modify field values on a DEF'd node in an X3D scene.

Finds the node by its DEF name and updates the specified attributes.
Returns the complete modified X3D XML document.

Args:
    x3d_source: Complete X3D XML document string or file path.
    def_name: The DEF name of the node to modify (e.g., "RedMat", "MainView").
    field_changes: JSON string of field=value changes to apply.
                   Example: '{"diffuseColor": "0 1 0", "transparency": "0.5"}'
                   Values are set as XML attribute strings.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
def_nameYes
x3d_sourceYes
field_changesYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

No annotations are provided, so the description carries the burden. It clearly states that the tool finds a DEF node and updates attributes, and returns the full modified XML document. It also notes values are set as XML attribute strings. However, it does not disclose behavior on missing DEF names, duplicate DEFs, or whether a file path input is modified in place, which limits transparency.

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 compact, starting with a clear one-line summary, followed by a brief elaboration and a structured Args list. Every sentence adds value without redundancy. It does not repeat schema details unnecessarily.

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 3-parameter tool with a simple output schema, the description covers the core purpose, parameters, and return value. However, the file path ambiguity (whether it reads from and writes back to the file) and lack of edge-case behavior leave some gaps. Overall it is reasonably complete but not exhaustive.

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?

The schema has zero property descriptions, so the description must compensate. It does so thoroughly: x3d_source is explained as a string or file path, def_name comes with examples, and field_changes includes a JSON example and clarifies that values are set as XML attribute strings. This greatly exceeds the schema's bare parameter names.

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 opens with 'Modify field values on a DEF'd node in an X3D scene,' which is a specific verb+resource. It further details the mechanism ('Finds the node by its DEF name and updates the specified attributes') and clearly distinguishes from sibling tools like add, remove, move, or animate by focusing on modifying existing node fields.

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

Usage Guidelines3/5

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

The description implies usage when one needs to change field values on an existing named node, but it does not explicitly state when not to use it or name alternative tools. For example, there is no guidance like 'for structural changes use x3d_add_node or x3d_remove_node.' This leaves the selection context only implied.

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/niknarra/x3d-mcp'

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