Skip to main content
Glama
peximo
by peximo

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
NameRequiredDescriptionDefault
searchTermYesThe text to search for in content titles
limitNoMaximum number of results (default: 10)

Implementation Reference

  • 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',
Behavior3/5

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

With no annotations provided, the description carries the full burden. It discloses the search is limited to titles ('by title'), which is a key behavioral constraint. However, it lacks details on case sensitivity, fuzzy matching, or what the return structure contains.

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?

Two sentences, zero waste. First sentence defines functionality, second provides usage context. Appropriately front-loaded and sized.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Lacks output schema and description does not hint at return format (IDs, full objects, etc.), which is important for an agent to know whether subsequent calls to get_node are needed. Parameters are fully covered by schema.

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% (both searchTerm and limit have descriptions), so the baseline score applies. The description does not add significant parameter semantics beyond what the schema already documents, though it reinforces that searchTerm applies to titles.

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

Purpose5/5

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

Description provides specific verb (search), resource (content), and scope (by title, across all types). It effectively distinguishes from siblings by emphasizing 'across all content types' and the condition 'when you don't know the specific content type', positioning it against query_content.

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

Usage Guidelines4/5

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

Provides clear when-to-use guidance ('when you don't know the specific content type'), implicitly distinguishing it from query_content. However, it does not explicitly name the alternative tool or state negative conditions (when not to use).

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/peximo/drupal-mcp-server'

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