Skip to main content
Glama

GetTable

Retrieve ABAP table structure from SAP systems to analyze database schema, understand field definitions, and support development workflows.

Instructions

Retrieve ABAP table structure

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
table_nameYesName of the ABAP table

Implementation Reference

  • The handler function that implements the core logic of the GetTable tool. It fetches the ABAP table structure source code from the SAP ADT endpoint using the provided table_name.
    export async function handleGetTable(args: any) { try { if (!args?.table_name) { throw new McpError(ErrorCode.InvalidParams, 'Table name is required'); } const encodedTableName = encodeURIComponent(args.table_name); const url = `${await getBaseUrl()}/sap/bc/adt/ddic/tables/${encodedTableName}/source/main`; const response = await makeAdtRequest(url, 'GET', 30000); return return_response(response); } catch (error) { return return_error(error); } }
  • Input schema definition for the GetTable tool, requiring a 'table_name' parameter.
    name: 'GetTable', description: 'Retrieve ABAP table structure', inputSchema: { type: 'object', properties: { table_name: { type: 'string', description: 'Name of the ABAP table' } }, required: ['table_name'] }
  • src/index.ts:317-318 (registration)
    Registration of the GetTable tool handler in the CallToolRequest switch statement, dispatching calls to handleGetTable.
    case 'GetTable': return await handleGetTable(request.params.arguments);
  • src/index.ts:18-18 (registration)
    Import statement for the GetTable handler function.
    import { handleGetTable } from './handlers/handleGetTable';

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

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