Skip to main content
Glama

search_collection_items

Search for items in a collection by query text, with optional field filters, pagination, and page size control.

Instructions

Recherche textuelle dans une collection

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
collectionYesNom de la collection
queryYesTerme de recherche
fieldsNoChamps où chercher, séparés par des virgules (ex: title,description)
pageNoNuméro de page
perPageNoItems par page

Implementation Reference

  • src/tools.ts:146-175 (registration)
    Tool registration for search_collection_items: defines name, description, and inputSchema (collection, query, fields, page, perPage). Required: collection and query.
    {
      name: "search_collection_items",
      description: "Recherche textuelle dans une collection",
      inputSchema: {
        type: "object",
        properties: {
          collection: {
            type: "string",
            description: "Nom de la collection",
          },
          query: {
            type: "string",
            description: "Terme de recherche",
          },
          fields: {
            type: "string",
            description: "Champs où chercher, séparés par des virgules (ex: title,description)",
          },
          page: {
            type: "number",
            description: "Numéro de page",
          },
          perPage: {
            type: "number",
            description: "Items par page",
          },
        },
        required: ["collection", "query"],
      },
    },
  • Handler for 'search_collection_items': extracts args (collection, query, fields, page, perPage) and calls skema.searchItems().
    case "search_collection_items": {
      const { collection, query, fields, page, perPage } = args as {
        collection: string;
        query: string;
        fields?: string;
        page?: number;
        perPage?: number;
      };
      result = await skema.searchItems(collection, query, {
        fields,
        page,
        perPage,
      });
      break;
    }
  • Helper function searchItems: calls mcpCall('search_collection_items', ...) forwarding collection, query, fields, page, perPage to the remote Skema API.
    export const searchItems = (
      collection: string,
      query: string,
      options?: { fields?: string; page?: number; perPage?: number }
    ) =>
      mcpCall("search_collection_items", {
        collection,
        query,
        fields: options?.fields,
        page: options?.page,
        perPage: options?.perPage,
      });
Behavior2/5

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

With no annotations, the description must disclose behavioral traits. It only states 'textual search' and fails to mention pagination behavior, case sensitivity, result limits, or error handling, which are critical 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 a single, front-loaded sentence. It is concise but perhaps too brief for a tool with 5 parameters. No wasted words, but slightly under-specified.

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?

The description lacks details on return format, pagination behavior (despite page/perPage parameters), sorting, or error states. For a search tool with no output schema, this is insufficient.

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 coverage is 100%, so the description adds no extra parameter context beyond what the schema already provides. The description does not clarify parameter interactions or constraints beyond the schema.

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 'Recherche textuelle dans une collection' clearly indicates a text search action on a collection. It distinguishes from listing tools like get_collection_items, but does not specify the type of search (e.g., full-text, fuzzy), leaving some ambiguity.

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 on when to use this tool versus alternatives like get_collection_items or count_collection_items. The description lacks explicit when-to-use or when-not-to-use directions.

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

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