Skip to main content
Glama

Create Bruno Request

create_request

Create Bruno API request files (.bru/.yml) with multipart form-data, file uploads, inline scripts, and assertions in one step, avoiding extra add_test_script calls.

Instructions

Generate request files for API testing (supports .bru and .yml formats). Supports multipart/form-data with file uploads and per-part contentType (body.type "form-data" with formData entries of type "file"), and inline scripts (pre-request/post-response/tests) so no separate add_test_script call is needed. Scripts run as async functions: top-level await works, and bru.sleep(ms)/setTimeout/setInterval are available, spending the script timeout (settings.timeout, default 5000ms) — raise it via the settings argument.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYes
authNo
bodyNo
nameYes
varsNo
queryNo
assertNoDeclared assertions, evaluated on every run without needing a test() block.
folderNo
methodYes
headersNo
scriptsNoInline scripts to persist with the request. Keys: pre-request, post-response, tests (aliases before-request/after-response accepted). Avoids a separate add_test_script call. IMPORTANT for tests/post-response: only assertions inside a test() block are reported. Write test("status is 200", function() { expect(res.getStatus()).to.equal(200); }); — a bare expect() at the top level still runs, but a passing one records nothing, so run_collection reports "tests": [] and the request looks green with no assertions. Available in scripts: res.getStatus()/getStatusText()/getHeader(name)/getHeaders()/getBody()/getResponseTime(), bru.setVar(name, value)/getVar(name), and expect(actual) with .to.equal/.contain/.include, .to.have.property/.lengthOf, .to.be.a/.an, .to.be.above/.below/.at.least/.at.most (aliases .gt/.lt/.gte/.lte/.greaterThan/.lessThan), .to.be.within(min, max), .to.be.oneOf([...]), .to.match(/re/), .to.startWith/.endWith, .to.be.true/.false/.null/.undefined/.empty/.json,and .to.not.* negations. RETURN TYPE: res.getBody() returns the response already parsed into a JS object/array when the Content-Type is application/json or a +json type (raw text otherwise). Access fields directly — res.getBody().field — and do NOT JSON.parse() it, which throws SyntaxError: "[object Object]" is not valid JSON.
sequenceNo
settingsNoRequest-level settings: transport behaviour (timeouts, redirects, URL encoding), not payload. What reaches the file depends on the dialect, because Bruno's own two writers differ: a .yml request always carries a fully resolved settings block whether or not you pass one, while a .bru request carries only what you supply. On modify_request the fields are merged individually over the existing block, so setting one does not clear the rest. Note the encodeUrl field: in .bru, creating a block at all changes the URL-encoding default.
pathParamsNoValues for :name segments in the URL, e.g. { id: "42" } for /users/:id.
collectionPathYesAbsolute path to existing collection directory.
Behavior4/5

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

With no annotations provided, the description carries the transparency burden and does well: it discloses script execution semantics (async functions, top-level await, bru.sleep/setTimeout/setInterval), the default 5000ms script timeout and how to raise it, and multipart/form-data file upload behavior. It does not mention return values or filesystem side effects in depth, but covers the non-obvious behaviors well.

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 front-loaded with the purpose and then packs in relevant technical details without much fluff. It is a single dense paragraph that could arguably be broken into bullets, but every sentence adds value and there is minimal waste.

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

Completeness4/5

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

For a complex tool with 15 parameters, nested bodies, and no output schema, the description covers the most nuanced behaviors: format support, multipart uploads, inline scripts, and script timeout semantics. It does not explain return values or creation side effects, but the schema details plus this description are enough for a knowledgeable agent to invoke it correctly.

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

Parameters4/5

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

Schema description coverage is low (33%), but the description compensates by explaining key parameter interactions beyond the schema, such as body.type 'form-data' with formData entries of type 'file' and the settings.timeout default. It also points users to the settings argument for raising the timeout. However, it does not cover all parameters, relying on the schema's property descriptions for topics like auth and scripts.

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 opens with 'Generate request files for API testing (supports .bru and .yml formats)', which clearly states the verb, resource, and scope. It distinguishes itself from siblings like modify_request and delete_request by focusing on creation, and explicitly mentions that inline scripts can avoid a separate add_test_script call.

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?

The description implies a creation use case and specifically notes that inline scripts eliminate the need for a separate add_test_script call. It does not explicitly contrast with modify_request or specify when not to use it, but the creation context is clear.

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/Ostico/bruno-mcp-studio'

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