Skip to main content
Glama
niknarra

x3d-mcp

by niknarra

x3d_extract_node

Extract a specific node from an X3D scene as XML by its DEF name or node type with index. Returns the full XML subtree for the matched node, enabling focused inspection and reuse.

Instructions

Extract a specific node (and its children) from an X3D scene as XML.

Identify the target node by its DEF name, or by node type + index. Returns
the full XML subtree of the matched node. If both def_name and node_type
are given, def_name takes precedence.

Args:
    x3d_source: Either an absolute file path to a .x3d file, or a complete
                X3D XML document string.
    def_name: The DEF name of the node to extract (e.g., "RedSphere").
              Use x3d_list_defs to see available names.
    node_type: The X3D node type to extract (e.g., "Material", "Transform").
               Combined with index to select which instance.
    index: 0-based index when extracting by node_type. Default 0 (first match).
           Use x3d_scene_stats to see how many of each type exist.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
indexNo
def_nameNo
node_typeNo
x3d_sourceYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

No annotations are present, so the description carries the full burden. It discloses that the return value is the full XML subtree, that def_name takes precedence, and that x3d_source can be a file path or XML string. It does not mention error behavior for no-match cases, but otherwise provides meaningful 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.

Conciseness5/5

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

The description is compact and well-organized, with a clear one-sentence purpose statement followed by a structured parameter list. It avoids unnecessary filler and every sentence contributes to understanding the tool.

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?

For a tool with 4 parameters and 0% schema description coverage, the description provides sufficient context to invoke it correctly: source format, selection modes, precedence, return value, and helpful sibling tools. The presence of an output schema further reduces the need to describe return structure in detail.

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 input schema has no parameter descriptions (0% coverage), but the description's Args section thoroughly explains each parameter: x3d_source, def_name, node_type, and index, including examples, defaults, and how they interact. This fully compensates for the missing schema descriptions.

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 a specific verb-resource pair: 'Extract a specific node (and its children) from an X3D scene as XML.' It clarifies selection by DEF name or node type + index, which distinguishes it from sibling tools like x3d_node_info or x3d_search_nodes.

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?

It explains when to use DEF name vs node type + index, states precedence when both are given, and points to x3d_list_defs and x3d_scene_stats for discovery. It does not explicitly contrast with alternative sibling tools, but the usage context is clear enough for selection.

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