search_content
Search Drupal content by title across all content types when you don't know the specific type. Find relevant content quickly with this cross-type search tool.
Instructions
Search across all content types by title. Useful when you don't know the specific content type.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| searchTerm | Yes | The text to search for in content titles | |
| limit | No | Maximum number of results (default: 10) |
Implementation Reference
- src/drupal-client.js:103-125 (handler)The handler implementation that searches across all content types by querying them individually and aggregating the results.
async searchContent(searchTerm, limit = 10) { try { // Get all content types first const contentTypes = await this.listContentTypes(); // Search in each content type and combine results const allResults = []; for (const type of contentTypes) { try { const results = await this.queryContent(type.id, { title: searchTerm, limit: Math.ceil(limit / contentTypes.length), status: true, }); allResults.push(...results); } catch (error) { // Skip types that error (might not have permission) continue; } } return allResults.slice(0, limit); } catch (error) { - src/index.js:82-93 (registration)The MCP tool registration for `search_content` in index.js, defining its description and input schema.
{ name: 'search_content', description: 'Search across all content types by title. Useful when you don\'t know the specific content type.', inputSchema: { type: 'object', properties: { searchTerm: { type: 'string', description: 'The text to search for in content titles', }, limit: { type: 'number',