Skip to main content
Glama

Get Best Practices

gt_best_practices
Read-onlyIdempotent

Retrieve current best practices for one library—patterns, performance, security, testing, migration—to guide implementation and avoid outdated guidance. Use when a specific library is named.

Instructions

Current best practices for one library: patterns, performance, security, testing, migration. libraryId: a plain name ('nextjs'), GroundTruth ID or npm:/pypi: package. Prefer over gt_search when one library is named.

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": {
      "libraryId": "<libraryId>"
    },
    "name": "gt_best_practices"
  }
}

Input Schema

NameRequiredDescriptionDefault
topicNoe.g. 'caching'; empty = general
tokensNo
versionNoe.g. '15'
libraryIdYesPlain name ('nextjs'), GroundTruth ID, or npm:/pypi: package

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv8.1.1
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • changedInput schema / properties / libraryId / description
      Previous value: -"Library ID (from gt_resolve_library), npm:package, pypi:package, or library name like 'nextjs', 'react'"New value: +"Plain name ('nextjs'), GroundTruth ID, or npm:/pypi: package"
    • removedInput schema / properties / tokens / description
      Removed value: -"Max tokens to return"
    • changedInput schema / properties / topic / description
      Previous value: -"Specific area: 'performance', 'security', 'testing', 'deployment', 'migration', 'patterns', 'v4 migration'. Leave empty for general best practices."New value: +"e.g. 'caching'; empty = general"
    • changedInput schema / properties / version / description
      Previous value: -"Version to scope results to, e.g. '14', '3.0.3'. Focuses extraction on version-specific patterns."New value: +"e.g. '15'"
  2. First observedv5.2.0

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, openWorldHint and destructiveHint=false, so safety is fully covered by structured data. The description adds useful scope context (single library, content categories covered) but says nothing about how the token budget shapes the response, whether output is cached, or what happens when the library identifier cannot be resolved. With annotations carrying the safety profile, this is an adequate but thin addition.

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?

Two telegraphic sentences, front-loaded with what the tool returns before the identifier format and the sibling routing rule. The libraryId clause duplicates schema text and could be dropped, but nothing else is wasted.

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?

For a read-only, no-output-schema tool this covers the essentials: scope, content areas, identifier formats and sibling preference. It leaves a real gap for a tool sitting in a 13-sibling catalog: it does not say whether libraryId must be resolved first via gt_resolve_library, how unresolvable names fail, or how the tokens/version parameters affect results.

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 75%, and the description's libraryId sentence is essentially a verbatim restatement of the schema's own libraryId description, adding examples that the schema already provides. It provides no interpretation of topic, version or tokens (e.g. how the budget trades off against topic depth). Baseline 3 applies when the schema does most of the work.

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 states a clear resource and scope: current best practices for exactly one library, itemized across patterns, performance, security, testing and migration. It also names the sibling it supersedes (gt_search) when a single library is named, so an agent can separate the two without opening schemas. It stops just short of 5 because it never says what form the answer takes (curated prose, snippets, checklist).

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?

"Prefer over gt_search when one library is named" gives an explicit alternative plus the condition that selects it, which is the key routing decision among these siblings. There is no when-not guidance (e.g. multi-library comparison should go to gt_compare, or whether gt_resolve_library must run first), so it is clear but not exhaustive.

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