Skip to main content
Glama

获取题解

nowcoder_get_problem_solutions
Read-onlyIdempotent

Retrieve community-written solutions for a specific Nowcoder programming problem by problem ID, with pagination and optional Markdown or JSON output for review or analysis.

Instructions

获取牛客网特定题目的社区题解列表。

Args:

  • problemId (string): 题目ID

  • page (number): 页码

  • response_format (string): 输出格式 - "markdown"(默认) 或 "json"

Returns: 题解列表,包含作者、标题、摘要、点赞数

Examples:

  • 获取题解: { "problemId": "1001", "page": 1 }

  • JSON格式: { "problemId": "1001", "response_format": "json" }

Error Handling:

  • 题目无题解时返回空结果提示

  • 页面加载超时时返回超时提示

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageNo页码,从1开始
problemIdYes题目ID
response_formatNo输出格式: 'markdown' 人类可读, 'json' 机器可解析markdown

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/openWorld/non-destructive, so the safety profile is covered. The description adds value beyond that by disclosing return contents (author, title, summary, likes) and Error Handling behavior (empty result notice, timeout notice) — genuinely useful behavioral context for an open-world scraper.

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?

Front-loads the one-line purpose, then uses labeled Args/Returns/Examples/Error Handling blocks that are easy to scan. Slightly verbose because Args and Returns restate schema-visible information, but nothing is wasted or buried.

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?

With no output schema, the description usefully summarizes the return fields, and it covers the empty/timeout failure modes. For a simple 3-param read tool this is close to complete; it only lacks guidance on paging behavior and how it relates to sibling solution/discussion tools.

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 description coverage is 100%, so page and problemId are already fully documented in the schema; the description largely repeats them. It does restate the response_format default ('markdown' 默认), adding marginal emphasis but no new semantics. Baseline 3 applies.

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?

States a specific verb and resource: 获取牛客网特定题目的社区题解列表 (get the community solution list for a specific problem). This is clearly distinct from sibling nowcoder_get_problem (problem statement) by naming the 'list of community solutions' resource. It stops short of explicitly contrasting with siblings, so 4 rather than 5.

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?

Usage is implied (fetch solutions for a given problem) and the Examples section shows concrete invocation shapes. However, there is no explicit when-to-use/when-not or routing against alternatives like nowcoder_get_problem or nowcoder_get_discussion, which is the key ambiguity for this family of tools.

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