Skip to main content
Glama

Get Collection Statistics

get_collection_stats

Retrieves statistics for a Bruno API collection, including request counts by method, folders, environments, and optional per-request details, with filters to narrow results.

Instructions

Get statistics about a Bruno collection — request counts by method, folders, environments, and per-request details including each request's file path and URL. environmentDetails lists each environment with the NAMES of the variables it declares, values withheld, so what an environment already defines is visible before merging into it with set_environment_variable. Use filePath values as entries in the requests list of run_collection.

SIZE: the per-request array is the bulk of the response and grows with the collection — a few hundred requests run to tens of kilobytes. Narrow it with folder, method or nameContains, or pass includeRequests: false for counts only. The counts always describe the WHOLE collection; a filtered call adds matchedRequests so the two cannot be confused.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "collectionPath": "<collectionPath>"
    },
    "name": "get_collection_stats"
  }
}

Input Schema

NameRequiredDescriptionDefault
folderNoReport only requests in this folder, path relative to the collection root. Nested folders are included, so "auth" also matches "auth/oauth2".
methodNoReport only requests with this method, case-insensitive. A request that has no method is bucketed under its kind, so "GRPC" and "WS" work here too.
nameContainsNoReport only requests whose name contains this text, case-insensitive.
collectionPathYesAbsolute path to collection directory. Use the path returned by list_collections.
includeRequestsNoSet false to drop the per-request array and return only the counts, folders and environments.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv2.4.0
    • addedInput schema / properties / folder
      Added value: +{
      +  "description": "Report only requests in this folder, path relative to the collection root. Nested folders are included, so \"auth\" also matches \"auth/oauth2\".",
      +  "type": "string"
      +}
    • addedInput schema / properties / includeRequests
      Added value: +{
      +  "default": true,
      +  "description": "Set false to drop the per-request array and return only the counts, folders and environments.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / method
      Added value: +{
      +  "description": "Report only requests with this method, case-insensitive. A request that has no method is bucketed under its kind, so \"GRPC\" and \"WS\" work here too.",
      +  "type": "string"
      +}
    • addedInput schema / properties / nameContains
      Added value: +{
      +  "description": "Report only requests whose name contains this text, case-insensitive.",
      +  "type": "string"
      +}
  2. First observedv2.2.1

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations, the description carries the disclosure burden and does it well: it quantifies response size (tens of kilobytes for hundreds of requests), states environment values are withheld while variable names are shown, and clarifies that counts always describe the whole collection while a filtered call adds matchedRequests. Missing is any statement of error behavior for a bad collectionPath, so it falls just short of full coverage.

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?

Front-loaded purpose followed by a clearly labeled SIZE paragraph that separates output-volume guidance from the core description. Dense but every sentence carries information; the enumeration of payload fields is slightly list-like but not padded.

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

Completeness5/5

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

With no output schema and five parameters, the description fully compensates by describing the return shape (counts, folders, environments, per-request array with filePath and URL), its size profile, how filtering interacts with counts, and how the output feeds sibling tools.

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 coverage is 100% and each parameter already documents itself, so the baseline applies. The description restates folder, method, nameContains and includeRequests as narrowing levers, adding the useful framing of filtering versus whole-collection counts but no syntax or semantics beyond the schema.

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?

States a specific verb and resource plus the exact payload: request counts by method, folders, environments, and per-request file paths and URLs. An agent can distinguish this from list_requests or list_collections purely from the sentence, since it names the aggregate statistics it returns.

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?

Gives concrete cross-tool routing: use filePath values as entries in run_collection's requests list, and use environmentDetails before merging with set_environment_variable. It also explains when to narrow versus pass includeRequests: false. It stops short of naming an alternative for plain listing (e.g. list_requests), so it is not a full when/when-not statement.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.