Skip to main content
Glama

get_solution

Retrieve solution code and key points for any algorithm problem by slug, with optional language selection.

Instructions

Get the solution code and key points for a problem

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
slugYesProblem slug, e.g. '0001.两数之和'
languageNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.1

TDQS

B3.1/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It does not disclose any side effects, prerequisites (e.g., needing to pick a problem first), return format, or whether it performs any mutations. It only says 'get', but lacks depth about what the agent should expect.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

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

A single, efficient sentence that directly states the tool's purpose. It is front-loaded with the key action and resource. No wasted words, though it could have been slightly more informative without losing conciseness.

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?

The tool has 2 parameters, no output schema, and no annotations. The description is minimal and does not specify how the solution is returned (e.g., code snippet, explanation), what 'key points' might include, or any dependencies on other tools like pick_problem. Given the complexity of retrieving solutions, this is incomplete.

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?

Schema coverage is 50%, with 'slug' being described and 'language' having an enum but no textual description. The description does not explain the 'language' parameter's purpose beyond its enum values, and it does not clarify that 'slug' is a required path identifier. Since coverage is moderate, the description adds minimal value beyond the schema.

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 gets the solution code and key points for a problem, with a specific resource (problem solution). It is distinct from siblings like get_theory or get_real_world_cases, though it does not explicitly name them, so it loses one point for lack of explicit differentiation.

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

Usage Guidelines3/5

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

The description implies usage when a user needs the solution to a specific problem, but it does not explain when to use it versus siblings like get_theory or get_real_world_cases. There is no explicit guidance on when not to use it or which alternatives exist, so it only implies context.

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