GetVirtualFoldersLow
Browse ABAP objects by package, group, or type using hierarchical virtual folders. Retrieve organized folder contents from the ADT information system with optional filters for object search pattern and facet ordering.
Instructions
[low-level] Retrieve hierarchical virtual folder contents from ADT information system. Used for browsing ABAP objects by package, group, type, etc.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| object_search_pattern | No | Object search pattern (e.g., "*", "Z*", "ZCL_*"). Default: "*" | * |
| preselection | No | Optional preselection filters (facet-value pairs for filtering) | |
| facet_order | No | Order of facets in response (e.g., ["package", "group", "type"]). Default: ["package", "group", "type"] | |
| with_versions | No | Include version information in response | |
| ignore_short_descriptions | No | Ignore short descriptions in response |
Implementation Reference
- Main handler function for GetVirtualFoldersLow MCP tool. Uses AdtUtils getVirtualFoldersContents to retrieve hierarchical virtual folder contents.
export async function handleGetVirtualFolders( context: HandlerContext, args: GetVirtualFoldersArgs, ) { const { connection, logger } = context; try { // Create AdtClient and get utilities const client = createAdtClient(connection, logger); const utils = client.getUtils(); logger?.info('Fetching virtual folders contents'); const params = { objectSearchPattern: args.object_search_pattern || '*', preselection: args.preselection, facetOrder: args.facet_order || ['package', 'group', 'type'], withVersions: args.with_versions, ignoreShortDescriptions: args.ignore_short_descriptions, }; const result = await utils.getVirtualFoldersContents(params); logger?.debug('Virtual folders contents fetched successfully'); return return_response(result); } catch (error: any) { logger?.error('Failed to fetch virtual folders contents', error); return return_error(error); } } - Tool definition including name 'GetVirtualFoldersLow', available_in, description, and inputSchema with properties: object_search_pattern, preselection, facet_order, with_versions, ignore_short_descriptions.
export const TOOL_DEFINITION = { name: 'GetVirtualFoldersLow', available_in: ['onprem', 'cloud'] as const, description: '[low-level] Retrieve hierarchical virtual folder contents from ADT information system. Used for browsing ABAP objects by package, group, type, etc.', inputSchema: { type: 'object', properties: { object_search_pattern: { type: 'string', description: 'Object search pattern (e.g., "*", "Z*", "ZCL_*"). Default: "*"', default: '*', }, preselection: { type: 'array', description: 'Optional preselection filters (facet-value pairs for filtering)', items: { type: 'object', properties: { facet: { type: 'string', description: 'Facet name (e.g., "package", "group", "type")', }, values: { type: 'array', items: { type: 'string' }, description: 'Array of facet values to filter by', }, }, required: ['facet', 'values'], }, }, facet_order: { type: 'array', items: { type: 'string' }, description: 'Order of facets in response (e.g., ["package", "group", "type"]). Default: ["package", "group", "type"]', default: ['package', 'group', 'type'], }, with_versions: { type: 'boolean', description: 'Include version information in response', default: false, }, ignore_short_descriptions: { type: 'boolean', description: 'Ignore short descriptions in response', default: false, }, }, required: [], }, } as const; - src/lib/handlers/groups/SystemHandlersGroup.ts:267-271 (registration)Registration of GetVirtualFoldersLow tool in SystemHandlersGroup.getHandlers() - maps toolDefinition and handler.
{ toolDefinition: GetVirtualFoldersLow_Tool, handler: (args: any) => { return handleGetVirtualFolders(this.context, args); }, - src/lib/handlers/groups/SystemHandlersGroup.ts:14-16 (registration)Import of TOOL_DEFINITION as GetVirtualFoldersLow_Tool from the handler file.
TOOL_DEFINITION as GetVirtualFoldersLow_Tool, handleGetVirtualFolders, } from '../../../handlers/system/low/handleGetVirtualFolders';