Skip to main content
Glama

request_reallocation

Reallocate unused token budget from lower-priority idle agents to an agent that needs more tokens, respecting priority and minimum reserves. Returns a plan with donors, amounts, and any shortfall.

Instructions

The core allocation-decision tool. Given an agent that needs additional tokens right now, run the library's priority-weighted borrowing logic to pull spare budget from eligible donor agents - starting with the lowest-priority, most-idle ones - and apply it for real. A donor is only eligible if its priority is <= the needy agent's priority (budget never flows from a more important agent to a less important one) and it never gives up tokens below its own protected min_reserve. Returns a concrete plan: which agents gave up how many tokens, which agent received them, why each donor was eligible, and how much of the requested amount could not be covered (if any). This performs a real reallocation against the live ledger, not a dry-run simulation - call get_remaining_budget first if you only want to inspect state without moving tokens.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
agent_idYesThe agent that needs additional budget right now.
tokens_neededYesHow many additional tokens this agent needs beyond what it currently has remaining.

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv0.1.0

TDQS

A4.7/5.0
Behavior5/5

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

There are no annotations, so the description carries the full behavioral burden. It clearly discloses that this performs a real reallocation against the live ledger, is not a dry-run simulation, enforces priority-based eligibility, protects min_reserve, and may only partially cover the requested amount. This is rich, actionable behavioral context.

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 dense but every sentence earns its place: core action, eligibility rules, return plan, and the critical real-vs-dry-run caveat are all included. It is front-loaded with the purpose and keeps the alternative routing at the end.

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?

Given there is no output schema, the description compensates by specifying the return plan contents: which donors gave up tokens, which agent received them, why each donor was eligible, and how much could not be covered. With safety, side effects, and when-not-to-use all covered, nothing essential is missing for correct invocation.

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 description coverage is 100%, so the schema already explains both agent_id and tokens_needed. The description adds minimal new parameter-level meaning beyond restating the need for additional tokens and the requested amount, so the baseline of 3 is appropriate.

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 clearly identifies the tool as the core allocation-decision tool that runs priority-weighted borrowing logic to move tokens from eligible donor agents to a needy agent. It also explicitly distinguishes itself from the inspection-only sibling get_remaining_budget, so an agent can tell them apart immediately.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description states exactly when to use it: when an agent needs additional tokens right now and a real reallocation is desired. It explicitly names the alternative for the non-mutating case, saying to call get_remaining_budget first if you only want to inspect state without moving tokens.

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

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/swaranshu-borgaonkar/tbc-mcp'

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