Skip to main content
Glama

denom_classify

Read-only

Classify a token denomination string into its type: native, ibc, evm, move, cw20, factory, or l2, enabling token identification across blockchain ecosystems.

Instructions

Classify a token denomination into its type: native, ibc, evm, move, cw20, factory, or l2.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
denomYesToken denomination string to classify

Implementation Reference

  • The tool registration for 'denom_classify' including its handler. The handler calls getDenomType() from @initia/initia.js/util to classify the denomination string and returns the result.
    registry.register({
      name: 'denom_classify',
      group: 'denom',
      description: 'Classify a token denomination into its type: native, ibc, evm, move, cw20, factory, or l2.',
      schema: { denom: z.string().describe('Token denomination string to classify') },
      annotations: { readOnlyHint: true },
      handler: async ({ denom }) => {
        const denomType = getDenomType(denom);
        return success({ denom, type: denomType });
      },
    });
  • Input schema: requires a single 'denom' string parameter describing the token denomination to classify.
    schema: { denom: z.string().describe('Token denomination string to classify') },
  • Registration via registry.register() with name 'denom_classify', group 'denom', and readOnlyHint annotation.
    registry.register({
      name: 'denom_classify',
      group: 'denom',
      description: 'Classify a token denomination into its type: native, ibc, evm, move, cw20, factory, or l2.',
      schema: { denom: z.string().describe('Token denomination string to classify') },
      annotations: { readOnlyHint: true },
      handler: async ({ denom }) => {
        const denomType = getDenomType(denom);
        return success({ denom, type: denomType });
      },
    });
  • The ToolRegistry.register() method that stores the tool definition after wrapping handlers with address normalization and coin formatting if configured.
    register<T extends ZodShape>(def: ToolDef<T>): void {
      if (this.tools.has(def.name)) {
        throw new Error(`Tool '${def.name}' is already registered`);
      }
      if (def.addressFields) {
        (def as any).handler = withAddressNormalization(def.handler as any, def.addressFields);
      }
      if (def.formatCoins) {
        (def as any).handler = withCoinFormatting(def.handler as any, def.formatCoins);
      }
      this.tools.set(def.name, def as ToolDef);
    }
  • The success() helper used to format the handler's response as JSON text content.
    export function success(data: unknown): CallToolResult {
      return { content: [{ type: 'text', text: JSON.stringify(data, safeReplacer(), 2) }] };
    }
Behavior3/5

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

The readOnlyHint annotation already signals safety. The description adds no extra behavioral details (e.g., API calls, side effects). It is consistent with the annotation but does not augment it.

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 a single sentence with no wasted words. It effectively communicates the tool's purpose and outputs in a compact form.

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?

Given the tool's simplicity (one parameter, read-only, no output schema), the description adequately covers what the tool does. It implies the return value is one of the listed types, which is sufficient for an AI agent to use the tool 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?

The input schema already provides a description for the 'denom' parameter. The tool description merely restates that it classifies a denomination string, adding no new semantic information beyond the schema's description.

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 verb 'classify' and the resource 'token denomination', and lists all possible output types. This distinguishes it from sibling tools like 'denom_metadata' which describe rather than classify.

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

Usage Guidelines3/5

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

The description implies usage for classification tasks but does not explicitly state when to use this tool versus alternatives (e.g., denom_metadata for metadata retrieval). No exclusion criteria or context cues are provided.

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/initia-labs/mcp'

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