Skip to main content
Glama

bruno_list_requests

Display all API requests within a Bruno collection to review available endpoints and their configurations for testing workflows.

Instructions

List all requests in a Bruno collection

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
collectionPathYesPath to the Bruno collection

Implementation Reference

  • ListRequestsHandler class that implements the core logic for the 'bruno_list_requests' tool: validates input, calls Bruno CLI to list requests, formats output.
    export class ListRequestsHandler implements IToolHandler { private readonly brunoCLI: IBrunoCLI; private readonly formatter: RequestListFormatter; constructor(brunoCLI: IBrunoCLI) { this.brunoCLI = brunoCLI; this.formatter = new RequestListFormatter(); } getName(): string { return 'bruno_list_requests'; } async handle(args: unknown): Promise<ToolResponse> { const params = ListRequestsSchema.parse(args); // Security validation const validation = await validateToolParameters({ collectionPath: params.collectionPath }); if (!validation.valid) { logSecurityEvent({ type: 'access_denied', details: `List requests blocked: ${validation.errors.join(', ')}`, severity: 'error' }); throw new McpError( ErrorCode.InvalidRequest, `Security validation failed: ${validation.errors.join(', ')}` ); } const requests = await this.brunoCLI.listRequests(params.collectionPath); return { content: [ { type: 'text', text: this.formatter.format(requests) } as TextContent ] }; } }
  • Zod schema for validating the input parameters of the bruno_list_requests tool.
    const ListRequestsSchema = z.object({ collectionPath: z.string().describe('Path to the Bruno collection') });
  • Tool definition in the TOOLS array, including name, description, and inputSchema for MCP protocol.
    { name: 'bruno_list_requests', description: 'List all requests in a Bruno collection', inputSchema: { type: 'object', properties: { collectionPath: { type: 'string', description: 'Path to the Bruno collection' } }, required: ['collectionPath'] } },
  • src/index.ts:291-291 (registration)
    Registers the ListRequestsHandler instance with the ToolRegistry.
    this.toolRegistry.register(new ListRequestsHandler(this.brunoCLI));

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

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