Skip to main content
Glama

create_category

Organize games in your Lutris library by creating custom categories to group and manage your collection effectively.

Instructions

Create a new game category

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesCategory name

Implementation Reference

  • The tool handler implementation for "create_category" which accepts a name parameter, calls the DB helper, and formats the result.
    server.tool(
      "create_category",
      "Create a new game category",
      {
        name: z.string().describe("Category name"),
      },
      async (params) => {
        try {
          const category = createCategory(params.name);
          return {
            content: [
              {
                type: "text",
                text: JSON.stringify({ message: "Category created", category }, null, 2),
              },
            ],
          };
        } catch (error) {
          return handleError(error);
        }
      }
    );
  • The database query function that actually inserts the new category into the SQLite database.
    export function createCategory(name: string): Category {
      const db = getDatabase();
      const result = db
        .prepare("INSERT INTO categories (name) VALUES (?)")
        .run(name);
      return { id: result.lastInsertRowid as number, name };
    }
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. While 'create' implies a write operation, it doesn't specify whether this requires authentication, what happens on duplicate names, whether the operation is idempotent, or what the response looks like. This leaves significant behavioral gaps 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.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that communicates the core purpose without any wasted words. It's appropriately sized for a simple tool with one parameter and gets straight to the point.

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?

For a mutation tool with no annotations and no output schema, the description is insufficient. It doesn't explain what happens after creation, what gets returned, error conditions, or how this tool fits into the broader workflow with sibling tools like 'list_categories' or 'assign_category'.

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 has 100% description coverage with the 'name' parameter clearly documented. The description adds no additional parameter information beyond what the schema already provides, so it meets the baseline for high schema coverage without adding extra value.

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 action ('create') and resource ('game category'), making the purpose immediately understandable. However, it doesn't differentiate from sibling tools like 'add_game' or 'assign_category' that might also involve creation operations in the same domain.

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?

The description provides no guidance on when to use this tool versus alternatives like 'add_game' or 'assign_category'. There's no mention of prerequisites, timing considerations, or relationships with other tools in the sibling list.

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/Praeses0/lutris-mcp'

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