Skip to main content
Glama
@odatano/nightgate-mcp

@odatano/nightgate-mcp

Official
by ODATANO

derive_token_type

Compute the raw token type from a minting contract address and domain separator so minted balances can be transferred and used with send and swap tools.

Instructions

Derive the raw token type a minting contract produces (compute-only, no wallet, no chain access). A custom token is addressed by rawTokenType(domainSeparator, contractAddress); without it the minted balance cannot be transferred. domainSeparator is the plain string the contract pads (Compact pad(32, "...")) or 64 hex for the padded bytes; defaults to the bundled test token's. The result is the tokenType of send_token and the swap tools.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "contractAddress": "<contractAddress>"
    },
    "name": "derive_token_type"
  }
}

Input Schema

NameRequiredDescriptionDefault
contractAddressYesThe minting contract address (64 hex)
domainSeparatorNoSeparator string or 64 hex; defaults to 'nightgate:zswap-e2e' (the bundled test token)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.18.3

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does significant work: it declares the tool compute-only with no wallet and no chain access, so the agent knows there are no side effects, no signing, and no network dependency. It also documents the default domain separator. It stops short of stating idempotency or error behavior explicitly, though pure computation implies determinism.

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?

Four dense sentences, front-loaded with the definition and scope, then the addressing formula, then input format, then how the result is consumed. Every sentence contributes, though the pad(32, ...) clause is terse enough to require domain knowledge.

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

Completeness4/5

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

There is no output schema, and the description compensates by saying the result is the tokenType consumed by send_token and the swap tools. For a two-parameter pure-compute helper this is nearly complete; the only gap is the literal format of the returned tokenType (e.g. 64 hex), which an agent might want before piping it onward.

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?

Schema coverage is 100%, so baseline would be 3, but the description adds real meaning the schema does not: it explains that domainSeparator may be the plain string the contract pads (Compact pad(32, "...")) or 64 hex of padded bytes, and that it defaults to the bundled test token. That clarifies why a single string parameter accepts two visually different forms.

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?

States a specific verb and resource ("Derive the raw token type a minting contract produces") and immediately qualifies the scope with "compute-only, no wallet, no chain access", which separates it from every transactional sibling like send_token or mint_token. An agent can identify the operation and its nature without opening the schema.

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?

Gives a concrete trigger condition — "without it the minted balance cannot be transferred" — and names the downstream consumers (send_token and the swap tools) whose tokenType parameter this value feeds. It lacks explicit when-not-to-use guidance or a named alternative, which keeps it short of a 5.

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