SearchObject
Find ABAP objects in SAP systems using quick search with wildcard support for development artifacts retrieval.
Instructions
Search for ABAP objects using quick search
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | Search query string (use * wildcard for partial match) | |
| maxResults | No | Maximum number of results to return |
Implementation Reference
- src/handlers/handleSearchObject.ts:4-17 (handler)The main handler function that implements the SearchObject tool logic: performs a quick search for ABAP objects using the SAP ADT API.export async function handleSearchObject(args: any) { try { if (!args?.query) { throw new McpError(ErrorCode.InvalidParams, 'Search query is required'); } const maxResults = args.maxResults || 100; const encodedQuery = encodeURIComponent(args.query); const url = `${await getBaseUrl()}/sap/bc/adt/repository/informationsystem/search?operation=quickSearch&query=${encodedQuery}&maxResults=${maxResults}`; const response = await makeAdtRequest(url, 'GET', 30000); return return_response(response); } catch (error) { return return_error(error); } }
- src/index.ts:253-271 (schema)Input schema definition for the SearchObject tool, specifying the query parameter as required and maxResults as optional.{ name: 'SearchObject', description: 'Search for ABAP objects using quick search', inputSchema: { type: 'object', properties: { query: { type: 'string', description: 'Search query string (use * wildcard for partial match)' }, maxResults: { type: 'number', description: 'Maximum number of results to return', default: 100 } }, required: ['query'] } },
- src/index.ts:327-328 (registration)Registration in the tool dispatcher switch statement, routing SearchObject calls to the handleSearchObject function.case 'SearchObject': return await handleSearchObject(request.params.arguments);
- src/index.ts:26-26 (registration)Import statement that brings in the SearchObject handler function.import { handleSearchObject } from './handlers/handleSearchObject';