Skip to main content
Glama

bruno_get_request_details

Retrieve comprehensive metadata and configuration details for API requests within Bruno collections to inspect parameters, headers, and structure before execution.

Instructions

Get detailed information about a specific request without executing it

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
collectionPathYesPath to the Bruno collection
requestNameYesName of the request to inspect

Implementation Reference

  • The GetRequestDetailsHandler class provides the core implementation of the bruno_get_request_details tool. It validates input parameters, retrieves request details via BrunoCLI, formats the output including method, URL, auth, headers, body, tests, and metadata, and returns it as text content.
    export class GetRequestDetailsHandler implements IToolHandler {
      private readonly brunoCLI: IBrunoCLI;
    
      constructor(brunoCLI: IBrunoCLI) {
        this.brunoCLI = brunoCLI;
      }
    
      getName(): string {
        return 'bruno_get_request_details';
      }
    
      async handle(args: unknown): Promise<ToolResponse> {
        const params = GetRequestDetailsSchema.parse(args);
    
        // Validate parameters
        const validation = await validateToolParameters({
          collectionPath: params.collectionPath,
          requestName: params.requestName
        });
    
        if (!validation.valid) {
          throw new McpError(
            ErrorCode.InvalidParams,
            `Invalid parameters: ${validation.errors.join(', ')}`
          );
        }
    
        try {
          const details = await this.brunoCLI.getRequestDetails(
            params.collectionPath,
            params.requestName
          ) as {
            name: string;
            method: string;
            url: string;
            auth: string;
            headers: Record<string, string>;
            body?: { type: string; content: string };
            tests?: string[];
            metadata: { type: string; seq?: number };
          };
    
          const output: string[] = [];
          output.push(`=== Request Details: ${details.name} ===`);
          output.push('');
    
          // Method and URL
          output.push(`Method: ${details.method}`);
          output.push(`URL: ${details.url}`);
          output.push(`Auth: ${details.auth}`);
          output.push('');
    
          // Headers
          if (Object.keys(details.headers).length > 0) {
            output.push('Headers:');
            Object.entries(details.headers).forEach(([key, value]) => {
              output.push(`  ${key}: ${value}`);
            });
            output.push('');
          }
    
          // Body
          if (details.body) {
            output.push(`Body Type: ${details.body.type}`);
            output.push('Body Content:');
    
            // Format body content with indentation
            const bodyLines = details.body.content.split('\n');
            bodyLines.forEach(line => {
              output.push(`  ${line}`);
            });
            output.push('');
          } else {
            output.push('Body: none');
            output.push('');
          }
    
          // Tests
          if (details.tests && details.tests.length > 0) {
            output.push(`Tests: ${details.tests.length}`);
            details.tests.forEach((test, index) => {
              output.push(`  ${index + 1}. ${test}`);
            });
            output.push('');
          } else {
            output.push('Tests: none');
            output.push('');
          }
    
          // Metadata
          output.push('Metadata:');
          output.push(`  Type: ${details.metadata.type}`);
          if (details.metadata.seq !== undefined) {
            output.push(`  Sequence: ${details.metadata.seq}`);
          }
    
          return {
            content: [
              {
                type: 'text',
                text: output.join('\n')
              } as TextContent
            ]
          };
        } catch (error) {
          const maskedError = error instanceof Error ? maskSecretsInError(error) : error;
          throw new McpError(
            ErrorCode.InternalError,
            `Failed to get request details: ${maskedError}`
          );
        }
      }
    }
  • Zod schema for validating input parameters of the bruno_get_request_details tool: collectionPath and requestName.
    const GetRequestDetailsSchema = z.object({
      collectionPath: z.string().describe('Path to the Bruno collection'),
      requestName: z.string().describe('Name of the request to inspect')
    });
  • src/index.ts:205-222 (registration)
    Tool registration in the TOOLS array, defining the name, description, and inputSchema for bruno_get_request_details exposed to the MCP protocol.
    {
      name: 'bruno_get_request_details',
      description: 'Get detailed information about a specific request without executing it',
      inputSchema: {
        type: 'object',
        properties: {
          collectionPath: {
            type: 'string',
            description: 'Path to the Bruno collection'
          },
          requestName: {
            type: 'string',
            description: 'Name of the request to inspect'
          }
        },
        required: ['collectionPath', 'requestName']
      }
    },
  • src/index.ts:296-296 (registration)
    Instantiation and registration of the GetRequestDetailsHandler instance in the ToolRegistry during server initialization.
    this.toolRegistry.register(new GetRequestDetailsHandler(this.brunoCLI));
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool retrieves information without execution, which implies a read-only, non-destructive operation, but doesn't cover aspects like authentication needs, rate limits, error handling, or the format of returned details. For a tool with zero annotation coverage, this is a significant gap in transparency.

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 a single, efficient sentence that front-loads the core purpose ('Get detailed information') and includes a key constraint ('without executing it'). There is zero waste, and every word earns its place, making it highly concise and well-structured for quick understanding.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity (2 required parameters, no output schema, and no annotations), the description is minimally adequate. It covers the basic purpose and non-execution aspect but lacks details on return values, error cases, or integration with sibling tools. Without annotations or output schema, more context would improve completeness, but it meets the minimum viable threshold.

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?

The input schema has 100% description coverage, with clear documentation for 'collectionPath' and 'requestName.' The description adds no additional meaning beyond the schema, such as examples or context for parameter usage. Since schema coverage is high, the baseline score of 3 is appropriate, as the description doesn't compensate but also doesn't detract.

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 ('Get detailed information') and resource ('about a specific request'), specifying the action without execution. It distinguishes from siblings like bruno_run_request (which executes) and bruno_list_requests (which lists multiple). However, it doesn't explicitly differentiate from bruno_validate_collection or bruno_validate_environment, which might also inspect requests, leaving minor 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 implies usage by stating 'without executing it,' suggesting this tool is for inspection rather than action, which helps differentiate from bruno_run_request. However, it lacks explicit guidance on when to use this versus alternatives like bruno_list_requests for overviews or bruno_validate_collection for validation, and no exclusions or prerequisites are mentioned.

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

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