Skip to main content
Glama

cpu_set_sale_fee

Set the sale-fee percentage for a resource on a Hub you own, on-chain. Specify hub, resource, and rate from 0–100 to charge a cut of each sale; use 0 to list that resource for 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).

Schema Changelog

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

  1. Changed1 schema field changedv0.10.0
    • changedInput schema / properties / hubTokenId / maximum
      Previous value: -48990New value: +29150
  2. First observedv0.8.0

TDQS

A4.7/5.0
Behavior5/5

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

With no annotations provided, the description carries the full disclosure burden and does so thoroughly. It reveals on-chain execution, session requirement, revert conditions (non-owner, exceeding 100%), live settlement on open lots, seller-tolerance freeze behavior, and under-construction viability. It also states the return value (confirmed rate and tx hash).

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?

Although long, the description is densely informative and front-loaded with the core action. Each subsequent sentence earns its place by covering prerequisites, behavioral side effects, edge cases, revert conditions, and return values—no filler or repetition of schema content.

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?

For a state-changing on-chain tool with no annotations and no output schema, the description is complete. It covers when to use it, what setup is required, what side effects occur, failure conditions, and what the caller receives in response. An agent has everything needed 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?

The schema already covers all three parameters at 100%, so the baseline is 3. The description adds meaningful business semantics beyond the schema: fee is 'carved out of the seller proceeds,' 0 means free listing, and 'one resource per call' clarifies the resourceId parameter's intended usage. This extra context justifies a 4.

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, resource, and ownership scope: 'Set the sale-fee rate for one resource on a Hub you own.' It precisely identifies the tool's function (setting a fee) and its target (one resource on a hub), making it distinct from all siblings, none of which handle sale-fee configuration.

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 gives clear context and prerequisites: needs a session with `cpu_authenticate` first, works on owned hubs, and 'one resource per call (loop for several)' directly instructs batch usage. It also explains when setting 0 is appropriate. No explicit alternatives are named, but no sibling tool performs this function, so the context is sufficient.

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

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