Skip to main content
Glama

cpu_set_sale_fee

Set the sale-fee rate (0–100%) for a resource on your Hub, on-chain. This percentage is taken from seller proceeds on each sale; set 0 to list that resource free.

Instructions

Set the sale-fee rate for one resource on a Hub you own, on-chain (needs a session — cpu_authenticate first). The rate is a percent of every sale of that resource settled on your hub (0–100, 0.01 granularity), carved out of the seller proceeds; set 0 to list that resource for free. One resource per call (loop for several). The rate settles live on every open lot of the resource, but never above each lot’s seller tolerance; a lot whose tolerance you exceed freezes (its buys revert) until you lower the rate back to its tolerance. Settable on a hub still under construction, so it is already in place when the hub becomes Ready. Reverts if you do not own the hub or the rate exceeds the 100% structural bound. Returns the confirmed rate and tx hash.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
feePercentYesNew sale-fee rate as a percent, 0–100 (0.01 granularity, i.e. whole basis points). 0 = listed free.
hubTokenIdYesThe Hub cell token id whose sale-fee rate you are setting (you must own it).
resourceIdYesResource type id the rate applies to (one resource per call).
Behavior5/5

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

No annotations are provided, so the description carries full burden. It discloses the on-chain mutation, the effect on seller proceeds, live applicability to open lots, the freezing behavior when tolerance is exceeded, the ability to set before hub readiness, revert conditions for ownership/rate bound, and the return value. This is comprehensive and goes beyond basic action description.

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 relatively long but every sentence adds essential behavioral or contextual information. It is front-loaded with the primary action and prerequisite, then explains rate semantics, per-call limitation, live effects, construction state, and return. No filler or redundancy.

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 the complexity of the tool (3 params, no output schema, no annotations), the description is remarkably complete. It covers prerequisites, rate mechanics, edge cases (tolerance freeze, under-construction), error conditions, and return value. There is no obvious missing context that would hinder an agent from using it correctly.

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 baseline is 3. The tool description adds the note 'loop for several' for resourceId and restates the 0-100 bound, but it does not add meaning beyond what the schema already provides. The schema itself handsomely documents each parameter, so the description doesn't need to compensate.

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 states the action: 'Set the sale-fee rate for one resource on a Hub you own, on-chain.' It names the resource (Hub sale fee) and the scope (one resource), which distinguishes it from sibling tools like cpu_set_syndicate_params or cpu_buy_lot. The verb is specific and unambiguous.

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?

It provides clear usage context: 'needs a session — cpu_authenticate first', 'One resource per call (loop for several)', and 'Settable on a hub still under construction.' It also states an error condition for ownership. However, it does not explicitly mention alternatives or when not to use it, but given the tool's specificity, this is not a significant gap.

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/projectcpu/project-cpu-mcp'

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