Skip to main content
Glama

Search Items (cbQL)

search_items

Search Codebeamer items by writing cbQL queries to filter by tracker, status, summary, priority, assigned user, or date. Returns paginated results.

Instructions

Search Codebeamer items using cbQL query language. Examples: 'tracker.id IN (42) AND status.name = "Open"', 'summary LIKE "login bug"', 'priority.name = "High" AND assignedTo.name = "john.doe"', 'project.id IN (1) AND modifiedAt >= -1w'. Use get_tracker to see available fields for a tracker.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYescbQL query string
pageNoPage number (starts at 1)
pageSizeNoItems per page (max 50)

Implementation Reference

  • The handler function for the search_items tool. It calls client.searchItems(query, page, pageSize) and formats the result using formatItemList.
    async ({ query, page, pageSize }) => {
      const result = await client.searchItems(query, page, pageSize);
      return { content: [{ type: "text", text: formatItemList(result) }] };
    },
  • Input schema (Zod) for the search_items tool: query (string), page (int, min 1, default 1), pageSize (int, min 1, max 50, default 25).
    {
      title: "Search Items (cbQL)",
      description:
        "Search Codebeamer items using cbQL query language. " +
        "Examples: " +
        "'tracker.id IN (42) AND status.name = \"Open\"', " +
        "'summary LIKE \"login bug\"', " +
        "'priority.name = \"High\" AND assignedTo.name = \"john.doe\"', " +
        "'project.id IN (1) AND modifiedAt >= -1w'. " +
        "Use get_tracker to see available fields for a tracker.",
      inputSchema: {
        query: z.string().describe("cbQL query string"),
        page: z
          .number()
          .int()
          .min(1)
          .default(1)
          .describe("Page number (starts at 1)"),
        pageSize: z
          .number()
          .int()
          .min(1)
          .max(50)
          .default(25)
          .describe("Items per page (max 50)"),
      },
  • Registration of the search_items tool via server.registerTool(). Called from registerItemTools() which is invoked in src/index.ts.
    server.registerTool(
      "search_items",
      {
        title: "Search Items (cbQL)",
        description:
          "Search Codebeamer items using cbQL query language. " +
          "Examples: " +
          "'tracker.id IN (42) AND status.name = \"Open\"', " +
          "'summary LIKE \"login bug\"', " +
          "'priority.name = \"High\" AND assignedTo.name = \"john.doe\"', " +
          "'project.id IN (1) AND modifiedAt >= -1w'. " +
          "Use get_tracker to see available fields for a tracker.",
        inputSchema: {
          query: z.string().describe("cbQL query string"),
          page: z
            .number()
            .int()
            .min(1)
            .default(1)
            .describe("Page number (starts at 1)"),
          pageSize: z
            .number()
            .int()
            .min(1)
            .max(50)
            .default(25)
            .describe("Items per page (max 50)"),
        },
      },
      async ({ query, page, pageSize }) => {
        const result = await client.searchItems(query, page, pageSize);
        return { content: [{ type: "text", text: formatItemList(result) }] };
      },
    );
  • The client.searchItems() method that performs the actual HTTP GET request to /items/query with queryString, page, pageSize params.
    async searchItems(
      queryString: string,
      page: number,
      pageSize: number,
    ): Promise<CbItem[]> {
      const raw = await this.http.get<unknown>("/items/query", {
        params: { queryString, page, pageSize },
        resource: "item query",
      });
      return toArray(raw);
    }
  • src/index.ts:40-40 (registration)
    Invocation of registerItemTools(server, client) in the main entry point, which triggers registration of all item tools including search_items.
    registerItemTools(server, client);
Behavior2/5

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

No annotations provided, so description carries full burden. It focuses on query syntax but does not disclose pagination behavior, rate limits, read-only nature, or error handling. Missing behavioral context beyond what schema provides.

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 with inline examples, no extraneous text. Purpose is front-loaded. Efficient and clear.

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?

No output schema, so description should explain return values or pagination behavior. It does not. Relies on user's cbQL knowledge. Incomplete for a search tool.

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

Parameters4/5

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

Schema coverage is 100%, baseline 3. Description adds value for the 'query' parameter with examples, but not for 'page' or 'pageSize' which are already clear in schema. Overall, enhances parameter understanding.

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?

Clearly states 'Search Codebeamer items using cbQL query language', specifying verb and resource. Distinguishes from siblings like 'list_tracker_items' or 'get_item' by emphasizing the cbQL query language.

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 multiple examples of cbQL queries and suggests using 'get_tracker' to see available fields. Lacks explicit when-not-to-use guidance but implies scope via examples.

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/3KniGHtcZ/codebeamer-mcp'

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