Skip to main content
Glama
Liquidiction

Liquidiction

get_prices

Retrieve current mid prices for all outcome coins to evaluate prediction market conditions.

Instructions

Get current mid prices for all outcome coins

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • mcp-server.ts:158-173 (registration)
    Registration of the 'get_prices' tool on the MCP server. The tool uses an empty schema (no parameters) and fetches all mid prices via hlInfo, filtering for outcome coins (prefixed with '#'), sorting them, converting to percentage format, and returning them as text.
    // --- get_prices ---
    server.tool(
      'get_prices',
      'Get current mid prices for all outcome coins',
      {},
      async () => {
        const mids = await hlInfo<Record<string, string>>({ type: 'allMids' });
        const outcomeMids = Object.entries(mids)
          .filter(([coin]) => coin.startsWith('#'))
          .sort(([a], [b]) => a.localeCompare(b))
          .map(([coin, px]) => `${coin}: ${(parseFloat(px) * 100).toFixed(2)}%`)
          .join('\n');
    
        return { content: [{ type: 'text', text: outcomeMids || 'No outcome prices found' }] };
      },
    );
  • Handler function for get_prices. Calls hlInfo<Record<string,string>>({type:'allMids'}) to fetch all mid prices from Hyperliquid, filters for outcome coins (starting with '#'), sorts alphabetically, converts prices to percentages (×100), and returns formatted text. Returns 'No outcome prices found' if none exist.
    async () => {
      const mids = await hlInfo<Record<string, string>>({ type: 'allMids' });
      const outcomeMids = Object.entries(mids)
        .filter(([coin]) => coin.startsWith('#'))
        .sort(([a], [b]) => a.localeCompare(b))
        .map(([coin, px]) => `${coin}: ${(parseFloat(px) * 100).toFixed(2)}%`)
        .join('\n');
    
      return { content: [{ type: 'text', text: outcomeMids || 'No outcome prices found' }] };
    },
  • The hlInfo helper function used by get_prices to make POST requests to the Hyperliquid API /info endpoint with typed generic response.
    async function hlInfo<T>(body: object): Promise<T> {
      const res = await fetch(`${API_URL}/info`, {
        method: 'POST',
        headers: { 'Content-Type': 'application/json' },
        body: JSON.stringify(body),
      });
      if (!res.ok) throw new Error(`HL API error: ${res.status}`);
      return res.json() as Promise<T>;
    }
  • Empty input schema ({}) for get_prices – the tool takes no parameters.
    {},
Behavior3/5

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

With no annotations, the description must disclose behavior. It correctly implies a read-only operation, but it does not mention caching, rate limits, or data freshness. For a simple get, this is adequate but not thorough.

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 concise sentence of eight words, front-loading the key information without any wasted words. It is appropriately sized.

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

Completeness2/5

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

Given no output schema, the description should clarify the return format and semantics of 'mid prices'. It does not specify whether the output is a single number, a list, or a mapping by coin. This lack of detail reduces completeness.

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 tool has no parameters and schema coverage is 100% (trivially). The description does not add parameter information, but none is needed. The baseline for zero-parameter tools is 4.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool retrieves current mid prices for outcome coins. It specifies the action ('get') and the resource ('mid prices') with a scope ('all outcome coins'), but it does not explicitly distinguish it from sibling tools like get_market_summary, which might also return price-related data.

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

Usage Guidelines2/5

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

No guidance is provided on when to use this tool versus alternatives such as get_candles or get_market_detail. There is no mention of context, prerequisites, or exclusions.

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/Liquidiction/liquidiction-mcp'

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