Skip to main content
Glama

GetNodeStructureLow

Fetch node structure for object tree navigation in ADT repository. Use parent type and name to discover structure, with optional node ID for child nodes.

Instructions

[low-level] Fetch node structure from ADT repository. Used for object tree navigation and structure discovery. Can use session_id and session_state from GetSession to maintain the same session.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
parent_typeYesParent object type (e.g., "CLAS/OC", "PROG/P", "DEVC/K")
parent_nameYesParent object name
node_idNoOptional node ID (default: "0000" for root). Use to fetch child nodes.0000
with_short_descriptionsNoInclude short descriptions in response
session_idNoSession ID from GetSession. If not provided, a new session will be created.
session_stateNoSession state from GetSession (cookies, csrf_token, cookie_store). Required if session_id is provided.

Implementation Reference

  • Main handler function for the GetNodeStructureLow tool. Validates args, optionally restores session state, creates ADT client, and calls fetchNodeStructure to retrieve node structure data from ADT repository.
    export async function handleGetNodeStructure(
      context: HandlerContext,
      args: GetNodeStructureArgs,
    ) {
      const { connection, logger } = context;
      try {
        // Validate required parameters
        if (!args?.parent_type) {
          return return_error(new Error('parent_type is required'));
        }
        if (!args?.parent_name) {
          return return_error(new Error('parent_name is required'));
        }
    
        // Restore session state if provided
        if (args.session_id && args.session_state) {
          const { restoreSessionInConnection } = await import(
            '../../../lib/utils.js'
          );
          await restoreSessionInConnection(
            connection,
            args.session_id,
            args.session_state,
          );
        }
    
        // Create AdtClient and get utilities
        const client = createAdtClient(connection, logger);
        const utils = client.getUtils();
    
        logger?.info(
          `Fetching node structure for ${args.parent_type}/${args.parent_name}`,
        );
    
        const result = await utils.fetchNodeStructure(
          args.parent_type,
          args.parent_name,
          args.node_id || '0000',
          args.with_short_descriptions !== false,
        );
    
        logger?.debug(
          `Node structure fetched successfully for ${args.parent_type}/${args.parent_name}`,
        );
    
        return return_response(result);
      } catch (error: any) {
        logger?.error('Failed to fetch node structure', error);
        return return_error(error);
      }
    }
  • TOOL_DEFINITION including name 'GetNodeStructureLow', description, and inputSchema with properties: parent_type, parent_name, node_id, with_short_descriptions, session_id, session_state.
    export const TOOL_DEFINITION = {
      name: 'GetNodeStructureLow',
      available_in: ['onprem', 'cloud'] as const,
      description:
        '[low-level] Fetch node structure from ADT repository. Used for object tree navigation and structure discovery. Can use session_id and session_state from GetSession to maintain the same session.',
      inputSchema: {
        type: 'object',
        properties: {
          parent_type: {
            type: 'string',
            description: 'Parent object type (e.g., "CLAS/OC", "PROG/P", "DEVC/K")',
          },
          parent_name: {
            type: 'string',
            description: 'Parent object name',
          },
          node_id: {
            type: 'string',
            description:
              'Optional node ID (default: "0000" for root). Use to fetch child nodes.',
            default: '0000',
          },
          with_short_descriptions: {
            type: 'boolean',
            description: 'Include short descriptions in response',
            default: true,
          },
          session_id: {
            type: 'string',
            description:
              'Session ID from GetSession. If not provided, a new session will be created.',
          },
          session_state: {
            type: 'object',
            description:
              'Session state from GetSession (cookies, csrf_token, cookie_store). Required if session_id is provided.',
            properties: {
              cookies: { type: 'string' },
              csrf_token: { type: 'string' },
              cookie_store: { type: 'object' },
            },
          },
        },
        required: ['parent_type', 'parent_name'],
      },
    } as const;
  • Registration of GetNodeStructureLow tool in SystemHandlersGroup, linking TOOL_DEFINITION to handleGetNodeStructure handler.
    {
      toolDefinition: GetNodeStructureLow_Tool,
      handler: (args: any) => {
        return handleGetNodeStructure(this.context, args);
      },
    },
  • Import of TOOL_DEFINITION as GetNodeStructureLow_Tool and handleGetNodeStructure from the handler file.
    import {
      TOOL_DEFINITION as GetNodeStructureLow_Tool,
      handleGetNodeStructure,
    } from '../../../handlers/system/low/handleGetNodeStructure';
Behavior2/5

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

No annotations provided; description carries full burden. It states it fetches node structure and can use session, but does not disclose read-only nature, behavior on invalid node_id, or any side effects. For a read operation, minimal behavioral context is given.

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?

Description is three sentences, front-loaded with purpose, and contains no extraneous information. Every sentence earns its place.

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

Completeness2/5

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

No output schema exists, and the description does not explain return values or error conditions. For a tool that fetches structure data, this omission reduces completeness significantly.

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

Parameters3/5

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

Schema description coverage is 100%; every parameter has a description. The tool description adds no additional semantics beyond the schema (e.g., it mentions session usage already in schema). Baseline of 3 is appropriate.

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 verb 'Fetch', resource 'node structure from ADT repository', and purpose 'object tree navigation and structure discovery'. The '[low-level]' tag and mention of session usage distinguish it from siblings like GetObjectStructureLow.

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?

Description mentions 'Used for object tree navigation and structure discovery' and session reuse, but does not explicitly state when not to use this tool or provide alternatives among the many sibling tools. Usage is implied but not differentiated.

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/fr0ster/mcp-abap-adt'

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