Skip to main content
Glama

Search Command Lua API

cmo_search_api
Read-onlyIdempotent

Search the Command Lua function catalog to verify real function names before scripting, then retrieve official documentation for a matching result.

Instructions

Search the Command Lua function catalog taken from https://commandlua.github.io/assets/Functions.html.

Use this before writing a script so the function name is real. Call cmo_get_function for the official page of one result.

Examples:

  • "add a ship" -> query="add unit"

  • "event triggers" -> query="set trigger"

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": {
      "query": "<query>"
    },
    "name": "cmo_search_api"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoMaximum matches to return
queryYesWords to match against function names, categories, and short summaries
offsetNoNumber of matches to skip
response_formatNo'markdown' for readable text, 'json' for structured datamarkdown

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint=false, so the safety profile is fully covered. The description adds useful workflow context, namely that this is a pre-authoring lookup step and that results can be followed up via cmo_get_function, but says nothing about result shape or how matching behaves. It adds some value beyond the annotations but not rich behavioral detail.

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?

Three short blocks: purpose, workflow guidance, then two compact examples. The guidance is front-loaded and every sentence carries information an agent would otherwise have to guess.

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?

For a read-only search tool with full annotations and a fully described schema, the definition covers purpose, sequencing, and drill-down adequately. It does not describe what a match record contains, though the absence of an output schema and the presence of response_format/limit/offset slightly reduce the cost of that gap.

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 the baseline is 3. The description earns an extra point by demonstrating query construction through mapping examples ('add a ship' -> query='add unit'), which conveys that queries should use canonical function vocabulary rather than natural language.

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 ('Search the Command Lua function catalog') and ties it to a concrete source URL. It also distinguishes itself from cmo_get_function by describing that tool's role, so an agent can tell the two apart without opening either 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 an explicit when-to-use rule ('Use this before writing a script so the function name is real') and routes the drill-down case to cmo_get_function. It stops short of saying when NOT to search (e.g., when the function name is already known), which keeps it from a 5.

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