Skip to main content
Glama
Lexmata

Bitbucket Cloud MCP Server

by Lexmata

list_issues

Retrieve and filter issues from a Bitbucket Cloud repository to track bugs, tasks, and feature requests. Use query parameters to sort results and control pagination.

Instructions

List issues in a repository with optional filtering.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
workspaceYesThe workspace slug
repo_slugYesThe repository slug
qNoQuery string for filtering
sortNoSort field
pageNoPage number
pagelenNoResults per page

Implementation Reference

  • Registration of the 'list_issues' tool in the toolDefinitions array for MCP, including name, description, and JSON schema for inputs.
    {
      name: 'list_issues',
      description: 'List issues in a repository with optional filtering.',
      inputSchema: {
        type: 'object' as const,
        properties: {
          workspace: { type: 'string', description: 'The workspace slug' },
          repo_slug: { type: 'string', description: 'The repository slug' },
          q: { type: 'string', description: 'Query string for filtering' },
          sort: { type: 'string', description: 'Sort field' },
          page: { type: 'number', description: 'Page number' },
          pagelen: { type: 'number', description: 'Results per page' },
        },
        required: ['workspace', 'repo_slug'],
      },
    },
  • Zod schema definition for validating inputs to the list_issues tool.
    list_issues: z.object({
      workspace: z.string().describe('The workspace slug'),
      repo_slug: z.string().describe('The repository slug'),
      q: z.string().optional().describe('Query string for filtering'),
      sort: z.string().optional().describe('Sort field'),
      page: z.number().optional().describe('Page number'),
      pagelen: z.number().optional().describe('Results per page'),
    }),
  • ToolHandler switch case that handles the 'list_issues' tool call: parses arguments with Zod schema and delegates to IssuesAPI.list method.
    case 'list_issues': {
      const params = toolSchemas.list_issues.parse(args);
      return this.issues.list(params);
    }
  • Core implementation of listing issues: makes a GET request to Bitbucket API endpoint /repositories/{workspace}/{repo_slug}/issues with query parameters.
    async list(params: ListIssuesParams): Promise<PaginatedResponse<BitbucketIssue>> {
      const { workspace, repo_slug, ...queryParams } = params;
      return this.client.get<PaginatedResponse<BitbucketIssue>>(
        `/repositories/${workspace}/${repo_slug}/issues`,
        queryParams as Record<string, string | number | undefined>
      );
    }
  • TypeScript interface defining the parameters for listing issues, used in IssuesAPI.list.
    export interface ListIssuesParams {
      workspace: string;
      repo_slug: string;
      q?: string;
      sort?: string;
      page?: number;
      pagelen?: number;
    }
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the action ('List') but doesn't describe whether this is a read-only operation, how pagination works (implied by 'page' and 'pagelen' parameters but not explained), rate limits, authentication needs, or what the output format looks like. This leaves significant gaps for an agent to understand the tool's behavior.

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, efficient sentence that front-loads the core purpose. It avoids unnecessary words, though it could be slightly more structured by explicitly calling out key parameters or usage scenarios without adding bulk.

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 of a list operation with filtering and pagination, no annotations, and no output schema, the description is incomplete. It doesn't explain the return format, error conditions, or behavioral nuances like pagination handling, which are critical for an agent to use the tool effectively in context with its siblings.

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%, so the schema already documents all six parameters thoroughly. The description adds minimal value by mentioning 'optional filtering' (hinting at parameters like 'q', 'sort'), but doesn't provide additional context beyond what's in the schema, such as examples of query strings or sort fields. This meets the baseline for high schema coverage.

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 clearly states the verb ('List') and resource ('issues in a repository'), making the purpose immediately understandable. However, it doesn't differentiate this tool from similar siblings like 'get_issue' or 'search_code', which could also retrieve issue-related data, so it misses the top score.

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?

The description mentions 'optional filtering' but provides no guidance on when to use this tool versus alternatives like 'get_issue' for single issues or 'search_code' for broader searches. There's no mention of prerequisites, such as requiring repository access, or exclusions for when other tools might be more appropriate.

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/Lexmata/bitbucket-mcp'

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