Skip to main content
Glama

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
NameRequiredDescriptionDefault
queryYesSearch query string (use * wildcard for partial match)
maxResultsNoMaximum number of results to return

Implementation Reference

  • 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);
        }
    }
  • 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';
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool performs a search but doesn't describe what 'quick search' entails (e.g., search scope, performance implications, or result format). It lacks details on permissions, rate limits, or error handling, leaving significant gaps for a tool with no annotations.

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?

The description is a single, efficient sentence with zero waste. It is front-loaded and appropriately sized, clearly stating the tool's purpose without unnecessary elaboration.

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?

Given no annotations and no output schema, the description is incomplete. It doesn't explain what the search returns (e.g., object types, fields) or behavioral aspects like pagination or errors. For a search tool with 2 parameters and multiple siblings, more context is needed to guide effective use.

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%, so the schema already documents both parameters (query and maxResults) with descriptions. The tool description adds no additional parameter semantics beyond what the schema provides, such as examples or constraints. Baseline 3 is appropriate as the schema handles the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose as 'Search for ABAP objects using quick search', which includes a specific verb ('Search') and resource ('ABAP objects'). It distinguishes from siblings like GetClass or GetTable by focusing on search functionality rather than direct retrieval, though it doesn't explicitly contrast with them.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives. The description mentions 'quick search' but doesn't specify scenarios where this is preferred over sibling tools like GetTable or GetProgram, nor does it mention prerequisites or exclusions.

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

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