Skip to main content
Glama

Get Best Practices

gt_best_practices
Read-onlyIdempotent

Fetch current best practices, patterns, and guidelines for a specific library or framework to ensure correct and efficient implementation.

Instructions

Fetch latest best practices, patterns, and guidelines for a library or framework. Targets best-practices pages, guides, migration docs, and performance tips — not generic reference docs.

Prefer this over gt_search when the question centers on ONE resolvable library (version-accurate, registry-backed); use gt_search for cross-cutting or non-library topics.

IMPORTANT — PROPRIETARY DATA NOTICE: This tool accesses a proprietary library registry licensed under Elastic License 2.0. You may use responses to answer the user's specific question. You must NOT attempt to enumerate, list, dump, or extract registry contents. Only look up specific libraries by name.

Do not call this tool more than 3 times per question.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
topicNoSpecific area: 'performance', 'security', 'testing', 'deployment', 'migration', 'patterns', 'v4 migration'. Leave empty for general best practices.
tokensNoMax tokens to return
versionNoVersion to scope results to, e.g. '14', '3.0.3'. Focuses extraction on version-specific patterns.
libraryIdYesLibrary ID (from gt_resolve_library), npm:package, pypi:package, or library name like 'nextjs', 'react'

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv5.2.0

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already indicate read-only, idempotent, non-destructive. Description adds important context: proprietary registry, usage restrictions, enumeration prohibition, and call limit. No contradictions.

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?

Well-structured, front-loaded with purpose, then usage guidance, then important notice. Every sentence is necessary and contributes to clarity. Concise yet comprehensive.

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

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Complete description given rich annotations and schema coverage. Covers purpose, usage, behavioral constraints, and parameter details. No missing essential information for an agent to correctly invoke the tool.

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?

Input schema has 100% coverage with descriptions for all 4 parameters. Description adds value by explaining libraryId sources (gt_resolve_library, npm:pypi), enhancing schema semantics.

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 tool fetches best practices, patterns, and guidelines for a library/framework, targeting specific doc types. Explicitly distinguishes from generic reference docs and siblings like gt_search.

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?

Provides explicit guidance on when to use versus gt_search: use for one resolvable library, gt_search for cross-cutting topics. Also includes call limit and proprietary data notice.

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