Skip to main content
Glama

searchContent

Find content in Adobe Experience Manager using Query Builder with filters for type, text, path, and result limits.

Instructions

Search content using Query Builder

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
typeNo
fulltextNo
pathNo
limitNo

Implementation Reference

  • Core handler function that executes the tool logic: sends QueryBuilder params to AEM query endpoint via HTTP GET, extracts hits and totalMatches, wraps in standardized SearchResponse using safeExecute and createSuccessResponse.
    async searchContent(params: SearchContentParams): Promise<SearchResponse> {
      return safeExecute<SearchResponse>(async () => {
        const response = await this.httpClient.get(this.config.endpoints.query, { params });
        
        return createSuccessResponse({
          params,
          results: response.data.hits || [],
          total: response.data.total || 0,
          rawResponse: response.data,
        }, 'searchContent') as SearchResponse;
      }, 'searchContent');
    }
  • MCP JSON Schema definition for the searchContent tool input parameters, used for tool discovery and validation.
    {
      name: 'searchContent',
      description: 'Search content using Query Builder',
      inputSchema: {
        type: 'object',
        properties: {
          type: { type: 'string' },
          fulltext: { type: 'string' },
          path: { type: 'string' },
          limit: { type: 'number' },
        },
      },
    },
  • TypeScript interface defining the expected input parameters for the searchContent method.
    export interface SearchContentParams {
      type?: string;
      fulltext?: string;
      path?: string;
      limit?: number;
    }
  • MCP server registration for ListToolsRequest, returning the tools array that includes searchContent.
    server.setRequestHandler(ListToolsRequestSchema, async () => {
      return { tools };
    });
  • MCP server tool call handler dispatch for searchContent, invoking the connector and formatting JSON response.
    case 'searchContent': {
      const result = await aemConnector.searchContent(args);
      return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
    }
Behavior2/5

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

No annotations are provided, so the description carries full burden. It mentions 'Query Builder' but doesn't explain what that entails—whether it's a specific query language, how results are returned (e.g., pagination, format), or any limitations (e.g., performance, access controls). This leaves significant behavioral gaps for a search tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is very concise—a single sentence—and front-loaded with the core action. However, it's arguably too brief, lacking necessary details, but within the given text, there's no wasted verbiage, earning a high score for efficiency.

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 the complexity of a search tool with 4 parameters, 0% schema coverage, no annotations, and no output schema, the description is incomplete. It doesn't cover parameter meanings, result format, or usage context, making it inadequate for effective tool selection and invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It doesn't explain any of the 4 parameters (type, fulltext, path, limit), such as what 'type' refers to (content types?), what 'fulltext' searches, how 'path' is used, or what 'limit' defaults to. This fails to add meaningful semantics beyond the bare schema.

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

Purpose3/5

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

The description states the tool searches content using Query Builder, which provides a basic purpose (searching content). However, it's vague about what 'content' refers to (pages, assets, components?) and doesn't distinguish this from sibling tools like 'enhancedPageSearch' or 'getAllTextContent', leaving ambiguity about scope and differentiation.

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. With siblings like 'enhancedPageSearch', 'listPages', and 'getAllTextContent', there's no indication of when this search method is preferred, what contexts it applies to, or any prerequisites for usage.

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/indrasishbanerjee/aem-mcp-server'

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