Skip to main content
Glama

Fetch Luogu Problem

luogu_fetch_problem
Read-only

Fetches problem statement, samples, tags, difficulty, and source URL from Luogu by problem ID.

Instructions

Fetch a Luogu problem statement, formats, samples, tags, difficulty, and source URL by pid.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pidYesLuogu problem id, such as P1305.
maxStatementCharsNoTrim long statements for model context control.
Behavior4/5

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

Annotations already indicate readOnlyHint=true and openWorldHint=true. Description adds useful context about the returned fields (statement, formats, etc.). No contradictions. Could mention non-obvious behaviors like network dependency or speed, but not required.

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?

Single sentence, front-loaded with key action and result. No redundant words. Efficient and clear.

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?

No output schema, but description lists return components (statement, formats, samples, tags, difficulty, source URL) which is comprehensive for a fetch-by-pid tool. Missing details like error handling or result count, but acceptable.

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 100%, so description adds little beyond schema descriptions. It confirms 'by pid' and mentions trimming long statements, but schema already explains both parameters adequately.

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?

Description clearly states the action (fetch), resource (Luogu problem), and what is returned (statement, formats, samples, tags, difficulty, source URL). It differentiates from sibling tools like search and list by specifying fetch by pid.

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?

Description implies usage when you have a specific pid and need detailed problem info, but does not explicitly state when to use vs alternatives like luogu_search_problems or luogu_find_related_problems. No exclusions or comparisons.

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/Kaiserunix/luogu-mcp-server'

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