Skip to main content
Glama

validate_function

Read-onlyIdempotent

USE WHEN confirming a Pine Script v6 function name is valid before using it in code. Returns a valid/invalid verdict with namespace suggestions or known replacement hints (e.g. ta.adx → ta.dmi, security → request.security). AFTER calling this tool, call get_functions(namespace) to list all valid functions in the relevant namespace if the function is invalid. Data sourced from bundled pine_v6_functions.json.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fn_nameYesFunction name to validate (e.g., 'ta.sma', 'strategy.entry', 'plot').

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and idempotentHint=true, so the description adds value by disclosing the return type (valid/invalid verdict), namespace suggestions, replacement hints, and the data source (bundled pine_v6_functions.json). No contradiction with annotations, though more detail about output structure could be beneficial.

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?

The description is concise (two sentences plus a data source note), front-loaded with the key usage directive, and every sentence contributes value. It includes examples and a follow-up instruction without any fluff.

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?

For a simple one-parameter tool with a rich output schema and clear annotations, the description covers purpose, usage conditions, follow-up actions, and data provenance. It is fully sufficient for the agent to select and invoke the tool correctly.

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?

The schema covers the only parameter (fn_name) with a description and examples, so the description does not significantly add meaning beyond what's already in the input schema. The examples in the description overlap with the schema's, providing no new parameter-level information.

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?

The description clearly states the tool validates Pine Script v6 function names, using a specific verb ('confirming') and resource. It distinguishes from sibling get_functions by referencing it as a follow-up action, and provides concrete examples (ta.adx → ta.dmi) that illustrate the tool's purpose.

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?

Explicitly begins with 'USE WHEN confirming a Pine Script v6 function name is valid before using it in code,' setting a clear usage condition. It also directs the agent to call get_functions(namespace) if the function is invalid, providing an explicit alternative path and when-not-to-use context.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

TDQS

A4.3/5.0
Disambiguation5/5

Each tool has a clearly distinct purpose: get_doc reads full files, get_section reads specific sections, list_docs and list_sections provide navigation, search_docs and resolve_topic offer different search methods, get_functions and validate_function handle function lookup, and get_prompt/list_prompts cover prompts. No two tools overlap in functionality.

Naming Consistency5/5

All tool names follow the verb_noun pattern consistently (e.g., get_doc, list_sections, search_docs). The naming convention is uniform with lowercase and underscores, making it predictable and easy for an agent to infer behavior.

Tool Count5/5

With 10 tools, the count is well-scoped for a documentation and function lookup server. It provides sufficient coverage without being overwhelming, fitting within the ideal range of 3-15 tools.

Completeness5/5

The tool surface comprehensively covers documentation discovery, reading, searching, navigation, and function validation. There are no obvious gaps for the stated purpose of accessing Pine Script v6 documentation and functions.

Resources