Skip to main content
Glama

check_code

Scan LSL code for AI-generated pitfalls: nonexistent functions, unsupported syntax, reserved word misuses. Returns line numbers and suggestions for each issue.

Instructions

Scan an LSL code snippet for known AI-generated pitfalls.

Checks for nonexistent function calls, unsupported syntax (ternary operators, switch statements), reserved words used as variable names, and other patterns from the pitfalls database.

Call this on any LSL you generate before presenting it to the user. Returns line numbers and suggestions for each issue found.

Args: code: Raw LSL source code as a string.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYes
Behavior4/5

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

With no annotations, the description carries the full burden. It explains what the tool checks (pitfalls) and that it returns line numbers and suggestions. However, it does not disclose if the tool is read-only or if it has side effects, but for a scanning tool this is acceptable. The description adds value beyond the input schema.

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 concise (approximately 8 lines) with no wasted words. It front-loads the purpose and usage guidance, then lists checks and parameter details in a clear, structured manner.

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

Completeness3/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 detail the return structure. It mentions 'line numbers and suggestions' but does not specify the format (e.g., list of objects). While the tool is simple, this omission could confuse an AI agent when interpreting results.

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 single parameter 'code' has no description in the schema. The description adds 'Raw LSL source code as a string,' which clarifies the expected input. While it could specify constraints like max length, the current description is sufficient for correct usage.

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 'scan', the resource 'LSL code snippet', and the specific purpose of finding AI-generated pitfalls. It lists specific checks like nonexistent functions and unsupported syntax, which distinguishes it from sibling tools that are informational (e.g., lookup_function, get_constants).

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

Usage Guidelines5/5

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

Explicitly states when to use the tool: 'Call this on any LSL you generate before presenting it to the user.' This provides clear guidance without ambiguity, covering the primary use case.

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/Treeeeeeeeeeeeee/second-life-mcp-server'

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