Skip to main content
Glama

search_bugs

Query bugs from a provider with filters by title, status, owner, assignee, milestone, and creation or modification dates.

Instructions

Search for bugs matching criteria on the given provider.

Date arguments should be ISO 8601 format (e.g. '2025-01-01').

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
provider_nameYes
titleNo
tagsNo
statusNo
importanceNo
ownerNo
assigneeNo
milestoneNo
created_sinceNo
created_beforeNo
modified_sinceNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The `search_bugs` tool handler function, registered via @mcp.tool() decorator. It accepts provider_name and optional search criteria (title, tags, status, importance, owner, assignee, milestone, date range), builds a BugSearchRecord query, calls `svc.search_bugs()`, and returns results as a list of dicts via `_bug_record_to_dict`.
    @mcp.tool()
    def search_bugs(  # noqa: PLR0913
        provider_name: str,
        title: str | None = None,
        tags: list[str] | None = None,
        status: str | None = None,
        importance: str | None = None,
        owner: str | None = None,
        assignee: str | None = None,
        milestone: str | None = None,
        created_since: str | None = None,
        created_before: str | None = None,
        modified_since: str | None = None,
    ) -> list[dict]:
        """Search for bugs matching criteria on the given provider.
    
        Date arguments should be ISO 8601 format (e.g. '2025-01-01').
        """
        svc = get_service()
    
        owner_record = UserRecord(username=owner) if owner else None
        assignee_record = UserRecord(username=assignee) if assignee else None
    
        query = BugSearchRecord(
            provider_name=provider_name,
            title=title,
            tags=tags or [],
            status=status,
            importance=importance,
            owner=owner_record,
            assignee=assignee_record,
            milestone=milestone,
            created_since=_parse_datetime(created_since),
            created_before=_parse_datetime(created_before),
            modified_since=_parse_datetime(modified_since),
        )
    
        try:
            results = svc.search_bugs(query=query, provider_name=provider_name)
        except ValueError as exc:
            return [{"error": str(exc)}]
    
        return [_bug_record_to_dict(r) for r in results]
  • The `@mcp.tool()` decorator on line 19 (and used for all tool functions) registers the `search_bugs` function as an MCP tool. The mcp instance is `FastMCP('ubuntu-mcp-bugs')`.
    @mcp.tool()
  • Construction of the `BugSearchRecord` query object (imported from `ubq.models`), which defines the input shape for the search. The function parameters (lines 73-84) also serve as the schema definition via type annotations.
    query = BugSearchRecord(
        provider_name=provider_name,
        title=title,
        tags=tags or [],
        status=status,
        importance=importance,
        owner=owner_record,
        assignee=assignee_record,
        milestone=milestone,
        created_since=_parse_datetime(created_since),
        created_before=_parse_datetime(created_before),
        modified_since=_parse_datetime(modified_since),
    )
  • `_bug_record_to_dict` helper that converts a bug record to a dict (used to format the search results).
    def _bug_record_to_dict(record) -> dict:
        return {
            "provider_name": record.provider_name,
            "id": record.id,
            "title": record.title,
            "description": record.description,
            "tags": record.tags,
            "created_at": _fmt_dt(record.created_at),
            "updated_at": _fmt_dt(record.updated_at),
            "last_message_at": _fmt_dt(record.last_message_at),
            "owner": _user_to_dict(record.owner),
            "assignee": _user_to_dict(record.assignee),
            "bug_tasks": [_task_to_dict(t) for t in record.bug_tasks],
            "comments": [_comment_to_dict(c) for c in record.comments],
        }
  • `_parse_datetime` helper that parses ISO 8601 date strings into datetime objects for the date-range search filters.
    def _parse_datetime(value: str | None) -> datetime | None:
        if value is None:
            return None
        return datetime.fromisoformat(value)
Behavior2/5

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

No annotations are present, so the description must carry the full behavioral disclosure. It only mentions date arguments but does not disclose whether the search is read-only, pagination behavior, required authentication, or what happens with no results. This is insufficient for a search tool with many parameters.

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?

The description is extremely concise with only two sentences, no redundant information. It is front-loaded with the main purpose and a key usage note. Every sentence earns its place.

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?

Given the complexity (11 parameters, no schema descriptions, no annotations, output schema exists but not described), the description is incomplete. It misses critical details on criterion combination (AND/OR), sorting, pagination, and return structure. The agent may misinterpret how to use the tool effectively.

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

Parameters2/5

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

The input schema has 11 parameters with 0% description coverage. The description only clarifies date format for date-related parameters, ignoring all other parameters like title, tags, status, etc. It adds minimal semantic value beyond the parameter names.

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?

The description clearly states the action 'search' and the resource 'bugs on a provider'. It is distinct from sibling tools: get_bug (single), list_bug_providers (list providers), login_provider (authentication), submit_bug (create). No ambiguity.

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

Usage Guidelines3/5

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

The description provides a date format guideline but does not explain when to use this tool versus alternatives like get_bug (for a known bug) or submit_bug (to create). No explicit 'when not to use' guidance is given.

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/lvoytek/ubuntu-mcp'

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