Skip to main content
Glama
fyllepo

qubic-mcp

by fyllepo

register_contract

Register custom smart contract definitions to query them by name. Provide the contract index and JSON function schemas for automatic encoding and decoding.

Instructions

Register a custom smart contract definition for use with query_contract.

Provide the contract's on-chain index and a JSON array of function definitions describing the binary input/output layout. Once registered, you can query the contract by name with automatic encoding and decoding.

Supported field types: uint8, uint16, uint32, uint64, int8, int16, int32, int64, identity (32-byte pubkey ↔ 60-char address), padding (skipped bytes).

Fields support "count" for arrays (e.g., 8 recipients) and "enum" for value→label mapping.

Example functions JSON: [{ "name": "getGateCount", "inputType": 6, "input": [], "output": [ { "name": "totalGates", "type": "uint64" }, { "name": "activeGates", "type": "uint64" } ] }]

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesContract name (e.g., QGate)
identityNoContract's 60-character Qubic identity (optional, informational)
functionsYesJSON array of function definitions with input/output field schemas
descriptionNoHuman-readable description of the contract
contractIndexYesOn-chain contract index
Behavior3/5

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

No annotations are present, so the description carries the full burden. It discloses supported field types, array count, enum mapping, and post-registration behavior, but omits side effects such as overwrite semantics, validation errors, or required permissions. This is a clear gap for a mutation tool.

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 core purpose, followed by usage summary, type details, and an example. It is longer than a one-liner but every sentence earns its place; the example is essential for understanding the expected JSON structure.

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

Completeness3/5

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

For a tool with 5 parameters and no output schema, the input side is well covered, but the description does not mention what the tool returns or how failures are reported. A brief note on return value and error handling would make it more complete, especially since there is no output schema.

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

Parameters5/5

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

Schema coverage is 100%, but the schema's description of the 'functions' parameter is generic. The description adds substantial meaning by detailing the JSON structure, supported field types, count/enum syntax, and providing a complete example. This goes well beyond the structured field descriptions.

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 "Register a custom smart contract definition for use with query_contract," clearly identifying the verb, resource, and intended downstream use. It distinguishes the tool from siblings like list_contracts and remove_contract by explicitly naming query_contract as the consumer.

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 explains that registration enables querying by name with automatic encoding/decoding, giving a clear context for when to use it. It does not explicitly exclude alternatives (e.g., query_smart_contract for built-in contracts), but the term 'custom' and the link to query_contract imply the scope.

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/fyllepo/qubic-mcp'

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