Skip to main content
Glama

register env tool

register_env_tool

Register or update an agent tool that training environments may call, specifying its HTTPS endpoint, authorization header, read-only flag, and per-episode call limit.

Instructions

Registers (or updates, by name) an agent tool that training environments for this workspace are allowed to call — the explicit consent grant naming the https endpoint, its credential, whether it is read-only, and a per-episode call cap. POST /v1/env/tools (API-key scope: platform:write). Returns: 201 with the tool view, snake_case: { id, name, endpoint_url, auth_prefix, read_only, max_calls_per_episode, enabled, created_at }. Notes: Request body keys are camelCase (endpointUrl, authHeader, readOnly, maxCallsPerEpisode) while the response is snake_case — the route lifts no aliases. 400 'Invalid JSON body' or 'Missing required field(s): name, endpointUrl' when either is missing/empty. Gated behind the fineTuning feature flag (404 when off). Requires an OWNER/ADMIN minting user (403). Registration-time host validation only; DNS rebinding is not defended here. Writes an audit event. No money implication by itself.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesTool name, 1-64 chars of letters, digits, '_', '.', '-' (trimmed). Upsert key: re-posting the same name updates the registration and re-enables it.
readOnlyNoWhether the tool is side-effect free. Defaults to true whenever omitted (including on update). camelCase only.
authHeaderNoFull Authorization header value to send to the tool (e.g. 'Bearer sk-...'). Stored encrypted, never returned. On update, omit to keep the existing header; send '' to clear it. 400 if encrypted storage is not configured. camelCase only.
endpointUrlYesAbsolute https URL the environment may call. Rejected (400) if not https, if it embeds username/password, or targets localhost, a private/loopback/link-local/CGNAT IPv4, IPv6 loopback/link-local/unique-local, IPv4-mapped private addresses, or a cloud metadata host. NOTE: camelCase key — no snake_case alias is accepted on this route.
maxCallsPerEpisodeNoPer-episode call cap, clamped to 1..500. Defaults to 20 whenever omitted (including on update). camelCase only.
Install Server

TDQS

A4.6/5.0
Behavior5/5

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

The description discloses a remarkable amount beyond annotations: update-by-name re-enabling, camelCase request vs snake_case response with no aliasing, exact error conditions (400/403/404), encrypted credential storage, omit-vs-clear authHeader behavior, registration-time-only host validation, DNS rebinding caveat, audit event writing, and the feature-flag gate. It does not contradict the annotations; the operation is a write, non-idempotent, non-destructive call.

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 dense and long, but every clause carries useful information: purpose, HTTP route, auth scope, response shape, error modes, prerequisites, and security caveats. It front-loads the core purpose before diving into details; a bulleted layout would improve scanability, but the current structure is well-ordered and free of filler.

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?

There is no output schema, yet the description supplies the 201 response object with field names, covers success and error paths, documents authorization and feature-flag requirements, explains updating vs creating, and flags the security limitation around DNS rebinding. For a registration tool with this many edge cases, nothing crucial is missing.

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?

Since schema coverage is 100%, the baseline is 3, but the description adds meaningful cross-cutting semantics: the request/response casing mismatch, update defaults and re-enable behavior, authHeader clearing semantics, encrypted-storage failure mode, and host-validation limitations. These details go beyond the individual parameter descriptions and help an agent avoid common mistakes.

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 a specific verb and resource: 'Registers (or updates, by name) an agent tool that training environments for this workspace are allowed to call.' It also captures the upsert nature ('or updates, by name') and the essential consent-granting purpose, making it clearly distinct from sibling operations like list_env_tools and delete_env_tool.

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 makes the operational context explicit: it is the consent grant naming the HTTPS endpoint, credential, read-only flag, and call cap, with prerequisites such as OWNER/ADMIN minting user and the fineTuning feature flag. It does not explicitly name alternative tools or say when not to use it, but the sibling names and the 'Registers (or updates)' framing give an agent sufficient guidance.

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

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/omnia-v/errorbar-mcp'

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