Skip to main content
Glama
handleGetTableContents.ts921 B
import { McpError, ErrorCode, AxiosResponse } from '../lib/utils'; import { makeAdtRequest, return_error, return_response, getBaseUrl } from '../lib/utils'; export async function handleGetTableContents(args: any) { try { if (!args?.table_name) { throw new McpError(ErrorCode.InvalidParams, 'Table name is required'); } const maxRows = args.max_rows || 100; const encodedTableName = encodeURIComponent(args.table_name); //NOTE: This service requires a custom service implementation const url = `${await getBaseUrl()}/z_mcp_abap_adt/z_tablecontent/${encodedTableName}?maxRows=${maxRows}`; const response = await makeAdtRequest(url, 'GET', 30000); return return_response(response); } catch (error) { // Specific error message for GetTableContents since it requires custom implementation return return_error(error); } }

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