Skip to main content
Glama

get_champion

Retrieve comprehensive TFT champion details including stats, traits, and abilities using exact or partial name matching to provide accurate game information.

Instructions

Get complete details for a specific TFT champion including all stats, traits, and ability description. Supports fuzzy name matching.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesChampion name to look up (exact or partial match)

Implementation Reference

  • The getChampion function performs a database lookup to retrieve details for a specific TFT champion, including exact, fuzzy, and suggestion-based matches.
    export function getChampion(
      db: Database.Database,
      input: GetChampionInputType,
    ): GetChampionResult {
      // 1. Exact match (case-insensitive)
      const exact = db
        .prepare('SELECT * FROM champions WHERE LOWER(name) = LOWER(?)')
        .get(input.name) as ChampionRow | undefined;
    
      if (exact) {
        return { found: true, champion: toChampionDetail(db, exact) };
      }
    
      // 2. Fuzzy match via FTS5
      const ftsMatch = db
        .prepare(
          `SELECT c.* FROM champions_fts fts
           JOIN champions c ON c.rowid = fts.rowid
           WHERE champions_fts MATCH ?
           ORDER BY fts.rank
           LIMIT 1`,
        )
        .get(input.name) as ChampionRow | undefined;
    
      if (ftsMatch) {
        return { found: true, champion: toChampionDetail(db, ftsMatch) };
      }
    
      // 3. Not found — provide suggestions
      const firstWord = input.name.split(/\s+/)[0];
      const suggestions = db
        .prepare('SELECT name FROM champions WHERE LOWER(name) LIKE LOWER(?) LIMIT 5')
        .all(`%${firstWord}%`) as Array<{ name: string }>;
    
      const suggestionNames = suggestions.map((s) => s.name);
    
      return {
        found: false,
        message: `No champion found matching "${input.name}".`,
        suggestions: suggestionNames.length > 0 ? suggestionNames : undefined,
      };
    }
  • The input schema for the get_champion tool, requiring a champion name string.
    export const GetChampionInput = z.object({
      name: z.string().describe('Champion name to look up (exact or partial match)'),
    });
  • src/server.ts:67-74 (registration)
    Registration of the get_champion tool in the main MCP server definition.
    // 2. get_champion
    server.tool(
      'get_champion',
      'Get complete details for a specific TFT champion including all stats, traits, and ability description. Supports fuzzy name matching.',
      GetChampionInput.shape,
      async (params) => {
        try {
          const result = getChampion(db, params);
Behavior3/5

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

With no annotations provided, the description carries the full burden. It discloses the fuzzy matching behavior, which is useful, but lacks details on error handling, rate limits, or authentication needs. It adequately describes the read operation but could be more comprehensive.

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 front-loaded with the core purpose in the first sentence and adds a key behavioral detail in the second. Both sentences earn their place with zero waste, making it efficient and well-structured.

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, no output schema, no annotations), the description is complete enough for a read operation. It covers purpose, usage context, and parameter behavior. However, without an output schema, it could benefit from hinting at the return format, though this is not critical for a basic lookup tool.

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 schema description coverage is 100%, with the parameter 'name' documented as 'Champion name to look up (exact or partial match)'. The description adds value by explicitly mentioning 'fuzzy name matching', reinforcing the partial match capability, but does not provide additional syntax or format details beyond the schema.

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 specific action ('Get complete details'), resource ('TFT champion'), and scope ('all stats, traits, and ability description'), distinguishing it from siblings like search_champions which likely returns multiple results rather than detailed information for a single champion.

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 provides clear context for usage ('Supports fuzzy name matching'), which helps differentiate it from exact-match tools. However, it does not explicitly state when not to use it or name alternatives, such as search_champions for broader queries, leaving some ambiguity.

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/gregario/tft-oracle'

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