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
| Name | Required | Description | Default |
|---|---|---|---|
| type | No | ||
| fulltext | No | ||
| path | No | ||
| limit | No |
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'); }
- src/mcp-server.ts:206-218 (schema)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' }, }, }, },
- src/interfaces/index.ts:300-305 (schema)TypeScript interface defining the expected input parameters for the searchContent method.export interface SearchContentParams { type?: string; fulltext?: string; path?: string; limit?: number; }
- src/mcp-server.ts:578-580 (registration)MCP server registration for ListToolsRequest, returning the tools array that includes searchContent.server.setRequestHandler(ListToolsRequestSchema, async () => { return { tools }; });
- src/mcp-server.ts:679-682 (handler)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) }] }; }