Skip to main content
Glama

pinescript-mcp

pinescript-mcp MCP server

AIアシスタント(Claudeなど)向けにPine Script v6ドキュメントを提供するMCPサーバー。

AIが以下のことを行えるようにします:

  • Pine Script関数の検索と構文の検証

  • インジケーター、ストラテジー、ビジュアルに関する公式ドキュメントへのアクセス

  • Pine Scriptの概念(実行モデル、リペイントなど)の理解

  • 適切な関数参照を用いた正しいv6コードの生成

クイックスタート (stdio)

Claude Code、Claude Desktop、Gemini CLI、およびstdioをサポートするすべてのMCPクライアントで動作します:

{
  "mcpServers": {
    "pinescript-docs": {
      "type": "stdio",
      "command": "uvx",
      "args": ["pinescript-mcp"]
    }
  }
}

Related MCP server: Pine Script MCP Server

パブリックサーバー (インストール不要)

Pythonやuvxは不要です。ホストされているサーバーに直接接続します。

Streamable HTTP — Claude Code、Claude Desktop、Cursor、Cline(typeフィールドを持つ標準の mcpServers):

{
  "mcpServers": {
    "pinescript-docs": {
      "type": "http",
      "url": "https://pinescript-mcp.fly.dev/mcp"
    }
  }
}

Windsurf — 独自の serverUrl 形式を使用します(Windsurfドキュメントを参照)。~/.codeium/windsurf/mcp_config.json を編集します:

{
  "mcpServers": {
    "pinescript-docs": {
      "serverUrl": "https://pinescript-mcp.fly.dev/mcp"
    }
  }
}

ChatGPT — 設定ファイルは不要です。ChatGPTで 設定 → コネクタ → 作成 に進み、サーバーURLフィールドに https://pinescript-mcp.fly.dev/mcp を貼り付けます。開発者モードを有効にする必要があります(OpenAI開発者モードガイドを参照)。

Claude.ai — JSONファイルではなく、Web UIのMCPコネクタ設定から追加します。

SSE (レガシートランスポート、古いクライアント向け):

{
  "mcpServers": {
    "pinescript-docs": {
      "type": "sse",
      "url": "https://pinescript-mcp.fly.dev/sse"
    }
  }
}

Streamable HTTPが推奨されます。SSEはMCPエコシステム全体で廃止されつつあります。

バージョン固定

ドキュメントはパッケージにバンドルされており、各バージョンには固定されたスナップショットが含まれています。再現性のあるエージェントの動作のために、特定のバージョンに固定してください:

{
  "mcpServers": {
    "pinescript-docs": {
      "command": "uvx",
      "args": ["pinescript-mcp==0.7.0"]
    }
  }
}

固定しない場合、uvx pinescript-mcp は最新バージョンを取得します。

注: 0.7.0 より前のバージョンには lint_script および edit_and_lint ツールが含まれていましたが、0.7.0で削除されました(ドキュメント専用サーバー)。0.6.xに固定すればこれらのツールを戻すことができますが、ホストされているFlyインスタンスでは lint_script の認証ゲートが完了していないため、HTTP上で認証エラーが返されます。現在の動作するツールセットを使用するには0.7.0以降に固定してください。

利用可能なツール

ツール

説明

resolve_topic(query)

正確なAPI用語(ta.rsi、repainting)の高速検索

search_docs(query)

すべてのドキュメントから正確な文字列をGrep検索

list_docs()

すべてのドキュメントファイルと説明を一覧表示

list_sections(path)

ドキュメントファイル内の ## ヘッダーを一覧表示(大きなファイルのナビゲーション用)

get_doc(path)

特定のドキュメントファイルを読み込む

get_section(path, header)

ヘッダーで特定のセクションを読み込む

get_functions(namespace)

有効な関数(ta、strategyなど)を一覧表示

validate_function(name)

Pine v6に関数が存在するか確認

list_resources()

利用可能なドキュメントリソースを閲覧

read_resource(uri)

URIでドキュメントリソースを読み込む(例: docs://manifest)

list_prompts()

利用可能なプロンプトテンプレートを一覧表示

get_prompt(name, arguments)

引数付きでプロンプトテンプレートをレンダリング

利用可能なプロンプト

プロンプト

説明

debug_error(error, code)

Pine Scriptのコンパイルエラーを分析

convert_v5_to_v6(code)

Pine Script v5コードをv6構文に変換

explain_function(name)

Pine Script関数を詳細に解説

利用可能なリソース

URI

説明

docs://manifest

ここから開始 — Pine Scriptの質問に対するルーティングガイド

docs://functions

Pine Script v6の完全な関数リスト(JSON)

docs://{path}

パスによる任意のドキュメントファイル(例: concepts/timeframes.md)

クエリ例

  • "Pine Scriptでトレイリングストップを作成するにはどうすればよいですか?"

  • "var と varip の違いは何ですか?"

  • "ta.supertrend は有効な関数ですか?"

  • "request.security でのリペイントを避けるにはどうすればよいですか?"

ドキュメントの網羅範囲

このサーバーには、包括的なPine Script v6ドキュメントがバンドルされています:

  • 概念: 実行モデル、タイムフレーム、色、メソッド、オブジェクト、一般的なエラー

  • リファレンス: 型、変数、定数、キーワード、演算子、アノテーション

  • 関数: テクニカル分析(ta.*)、ストラテジー、リクエスト、描画、コレクション

  • ビジュアル: プロット、塗りつぶし、形状、テーブル、ライン、ボックス、背景

  • スクリプト作成: スタイルガイド、デバッグ、最適化、制限事項

なぜこれを使うのか?

AIモデルは、Pine Scriptの関数をハルシネーション(幻覚)したり、非推奨のv5構文を使用したりすることがよくあります。このMCPサーバーは、AIを実際のv6ドキュメントに基づかせることで、以下を防ぎます:

  • 架空の関数名(例: ta.hull は存在しません。ta.hma を使用してください)

  • v4/v5からの非推奨構文

  • 不正確なパラメータ順序

  • 必須引数の欠落

スキル

bouch.dev/products/pine-strategy-builder で利用可能なスキルと組み合わせることで、さらに制御が可能になります。

開発

# Clone and install locally
git clone https://gitlab.com/articat1066/pinescript-v6-mcp
cd pinescript-mcp
pip install -e .

# Run the server
pinescript-mcp

ライセンス

MIT

Available Tools

10 tools
get_docA
Read-onlyIdempotent

Read a specific Pine Script v6 documentation file.

For large files (ta.md, strategy.md, collections.md, drawing.md, general.md) prefer list_sections() + get_section() to avoid loading 1000-2800 line files into context.

ParametersJSON Schema
NameRequiredDescriptionDefault
pathYesRelative path to the documentation file (e.g., "reference/functions/ta.md")
limitNoMaximum characters to return. Use 30000 for large files to avoid token limits.
offsetNoCharacter offset to start reading from (default: 0)

TDQS

A4.4/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. The description adds context about large file handling but does not elaborate on other behavioral aspects like error handling or return format. Still, it adds value beyond annotations.

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?

Two sentences, front-loaded with purpose, and no wasteful words. Every sentence adds essential information.

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?

For a read operation with no output schema, the description sufficiently explains what the tool does and how to use it effectively. It could mention the return format, but overall it is complete enough.

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% with clear descriptions for path, limit, and offset. The description does not add further parameter details beyond the schema, meeting the baseline for high coverage.

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 reads a Pine Script v6 documentation file, with a specific verb 'Read' and resource 'documentation file'. It distinguishes from siblings like list_sections() and get_section() by implying this is for the whole file.

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 advises to prefer list_sections() + get_section() for large files to avoid loading 1000-2800 line files, providing clear when-to-use and when-not-to-use guidance.

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

get_functionsA
Read-onlyIdempotent

Get valid Pine Script v6 functions, optionally filtered by namespace.

Use before writing Pine Script to see which functions exist. For checking a single function name, use validate_function() instead.

ParametersJSON Schema
NameRequiredDescriptionDefault
namespaceNoFilter by namespace (e.g., "ta", "strategy", "request"). Empty string returns all functions grouped by namespace.

TDQS

A4.4/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. The description adds context about grouping by namespace and optional filtering, which is helpful but not extensive.

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?

Three sentences, front-loaded with purpose, no extraneous information. Efficiently structured.

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 exists, and the description does not specify the output format (e.g., list of function names). However, the grouping hint and simple parameter set make it fairly complete.

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% and the description largely repeats the schema's parameter description ('Empty string returns all functions grouped by namespace'). No additional meaning beyond the schema.

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 specifies 'Get valid Pine Script v6 functions', clearly stating the verb and resource. It distinguishes from sibling 'validate_function' by noting the alternative for single function checks.

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 says 'Use before writing Pine Script to see which functions exist' and provides a direct alternative: 'For checking a single function name, use validate_function() instead.'

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

get_promptA

Get a prompt by name with optional arguments.

Returns the rendered prompt as JSON with a messages array. Arguments should be provided as a dict mapping argument names to values.

ParametersJSON Schema
NameRequiredDescriptionDefault
nameYesThe name of the prompt to get
argumentsNoOptional arguments for the prompt

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.5/5.0
Behavior4/5

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

With no annotations, the description carries the behavioral transparency burden. It explains the return format (JSON with a messages array) and clarifies how arguments should be structured (dict mapping names to values). It does not cover error cases or side effects, but for a simple get operation this is adequate.

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 two sentences, front-loaded with the primary action ('Get a prompt by name'), followed by concise return-format and argument-format details. Every sentence adds value with no redundancy or filler.

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?

Given the tool has only two parameters, an output schema, and no annotations, the description covers the essential behavioral aspects: what it retrieves, how to pass arguments, and what the return shape looks like. It is sufficiently complete for an agent to invoke the tool correctly without further context.

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?

The input schema already provides descriptions for both parameters (name and arguments), giving 100% coverage. The description adds extra meaning by specifying that arguments must be a dict mapping argument names to values, which is not fully detailed in the schema. This elevates the score above the baseline.

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 fetches a prompt by name, with optional arguments. This distinguishes it from sibling tools like list_prompts (which would enumerate prompts) and call_tool (which invokes tools). The verb-resource pair is specific and unambiguous.

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?

The description implies when to use this tool: when you know the prompt's name and want its rendered output. It does not explicitly mention alternatives or provide 'when not to use' guidance, but the context is clear enough for an agent to decide appropriately.

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

get_sectionA
Read-onlyIdempotent

Get a specific section from a documentation file by its header.

Use after list_sections() shows available headers, or after resolve_topic() / search_docs() identifies the relevant file.

ParametersJSON Schema
NameRequiredDescriptionDefault
pathYesDocumentation file path (e.g., "reference/functions/strategy.md")
headerYesHeader text to find (e.g., "strategy.exit()" or "## strategy.exit()")
include_childrenNoInclude nested subsections under the header (default: True)

TDQS

A4.3/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true and idempotentHint=true. The description does not contradict these and adds no further behavioral context, but consistency is maintained.

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?

Two sentences: first states purpose, second gives usage context. No fluff, perfectly sized.

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 retrieval tool with 3 well-documented params and no output schema, the description provides workflow guidance and is complete. Annotations support safety.

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?

Input schema has 100% coverage, so description does not need to add param details. It doesn't add beyond schema, which is adequate meeting baseline.

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 'Get a specific section from a documentation file by its header,' specifying the verb 'Get,' resource 'section,' and qualification 'by its header.' It distinguishes from siblings like get_doc (whole doc) and list_sections (list headers).

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 states when to use: 'Use after list_sections() shows available headers, or after resolve_topic() / search_docs() identifies the relevant file.' Provides clear context and mentions alternatives.

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

list_docsA
Read-onlyIdempotent

List all available Pine Script v6 documentation files with descriptions.

Returns files organised by category with descriptions. For small files use get_doc(path). For large files (ta.md, strategy.md, collections.md, drawing.md, general.md) use list_sections(path) then get_section(path, header).

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4.7/5.0
Behavior4/5

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

Annotations already declare read-only and idempotent behavior. The description adds that it returns files organized by category, which is useful context. No contradictions or missing behavioral aspects.

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 two sentences, concise and front-loaded. Every sentence adds value: first states the purpose, second provides usage guidance. No unnecessary words.

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?

The tool is simple with no output schema, but the description adequately describes the output (files with descriptions organized by category). The sibling tools and usage guidelines provide full context for the user.

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 no parameters, so schema coverage is 100%. The description does not need to add parameter details. A baseline of 4 is appropriate for a parameterless tool.

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 it lists all available Pine Script v6 documentation files with descriptions, organized by category. This is a specific verb+resource, and it distinguishes from siblings like get_doc (single file) and list_sections (sections within a file).

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?

The description provides explicit guidance on when to use this tool (to list all files) and when to use alternatives: for small files use get_doc, for large files use list_sections then get_section. It even names the specific large files.

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

list_promptsA

List all available prompts.

Returns JSON with prompt metadata including name, description, and optional arguments.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.2/5.0
Behavior3/5

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

With no annotations provided, the description must carry the full burden of behavioral disclosure. It states that the tool returns JSON metadata, which is useful, but it does not explicitly state that this is a read-only operation with no side effects, nor does it mention any limitations like pagination. For a simple list operation, this is adequate but not rich.

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 two terse sentences: the first delivers the primary action, the second clarifies the return format. Every word earns its place, with no redundancy or irrelevant detail.

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?

For a zero-parameter tool with an existing output schema, the description covers the essential purpose and return type. It is complete, but could be slightly more helpful by explicitly connecting to get_prompt for retrieving specific prompts, which would aid discoverability.

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?

The tool has zero parameters, so the description does not need to explain parameter meaning. The description adds a small amount of value by mentioning that the output includes 'optional arguments', but per the guideline, 0 params warrants a baseline score of 4.

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 action ('List') and the resource ('all available prompts'), making the purpose unambiguous. It also distinguishes from siblings like list_resources by specifying prompts, and from get_prompt by listing rather than retrieving a specific prompt.

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?

The description implies when to use the tool: to enumerate all available prompts. It does not explicitly mention alternatives or exclusions, but the context is clear for a list operation with no parameters. A brief note on using it before get_prompt would elevate this to a 5.

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

list_sectionsA
Read-onlyIdempotent

List all section headers in a doc file. Use before get_section() to find the right header.

Especially useful for large files like ta.md, strategy.md, collections.md, drawing.md, general.md which have 50-115 sections each.

ParametersJSON Schema
NameRequiredDescriptionDefault
pathYesDocumentation file path (e.g., "reference/functions/ta.md")

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already provide readOnlyHint and idempotentHint, so description doesn't need to repeat. It adds useful context about file sizes and specific files, which goes beyond annotations.

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?

Two sentences with no wasted words: first states purpose and usage, second provides context. Front-loaded with key information.

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 list tool, the description covers purpose, usage, and practical examples. No output schema needed given the straightforward return.

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 already fully describes the single parameter 'path' (100% coverage). Description adds no additional meaning beyond what's in the schema.

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 'List all section headers in a doc file' using a specific verb and resource. It distinguishes itself from sibling tools by noting it should be used before get_section().

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 advises 'Use before get_section() to find the right header' and provides concrete examples of when it's especially useful (large files like ta.md, strategy.md).

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

resolve_topicA
Read-onlyIdempotent

Fast lookup for exact Pine Script API terms and known concepts.

Use for exact function names and Pine Script vocabulary (e.g., "ta.rsi", "strategy.entry", "repainting", "request.security").

For natural language questions, read the docs://manifest resource for routing guidance, then use get_doc() or list_sections() + get_section().

ParametersJSON Schema
NameRequiredDescriptionDefault
queryYesExact Pine Script term or known concept keyword.

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.7/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. Description adds that it is a 'fast lookup,' giving context on performance. No contradiction. Additional behavioral details like return format or error handling are not needed given the simplicity.

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?

Three sentences, no extraneous information. Purpose is stated first, followed by usage examples and routing guidance. Efficient and well-structured.

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?

Given the tool's simplicity (one required param, clear annotations, output schema exists), the description is complete. It covers purpose, usage boundaries, and alternatives, leaving no gaps.

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?

Schema coverage is 100% with a clear description. Description reinforces the parameter's purpose and provides examples, adding value beyond the schema field.

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 it is a fast lookup for exact Pine Script API terms and known concepts, with specific examples. It distinguishes from sibling tools by specifying that for natural language questions, other tools like get_doc or list_sections should be used.

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 states when to use (exact function names and Pine Script vocabulary) and when not to use (natural language questions), providing direct guidance to route to other tools like get_doc or list_sections.

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

search_docsA
Read-onlyIdempotent

Search Pine Script v6 documentation and return matching sections.

Finds sections containing the query and returns previews with get_section() call hints so you can read the full content.

Multi-word queries use AND logic: all terms must appear in the section (not necessarily on the same line).

ParametersJSON Schema
NameRequiredDescriptionDefault
queryYesSearch terms (case-insensitive). Multi-word queries match sections containing ALL terms.
max_resultsNoMaximum sections to return (default: 5)

TDQS

A4.4/5.0
Behavior5/5

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

Annotations already indicate readOnly and idempotent behavior. The description adds value by explaining that results are previews with hints to read full content via get_section(), and that query terms must all appear in a section. No contradiction with annotations.

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 three sentences with no filler. Each sentence adds essential information: purpose, result structure, and query behavior. Front-loaded with the core action.

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?

The description provides a good overview of behavior and result format, but lacks explicit details on the structure of previews or call hints (no output schema). It is nearly complete for a search tool but could be slightly more precise.

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% with descriptions for both parameters. The description repeats the AND logic already in the query parameter description and does not add new meaning. With full schema coverage, baseline 3 is appropriate.

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 searches Pine Script v6 documentation and returns matching sections. It uses specific verbs ('Search', 'return') and identifies the resource ('Pine Script v6 documentation'). It distinguishes from siblings like 'get_section' and 'get_doc' by focusing on search.

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?

The description provides explicit query syntax guidance ('Multi-word queries use AND logic') and hints for further action ('get_section() call hints'). However, it does not explicitly state when to use this tool versus alternatives (e.g., 'get_section' for a specific section), leaving some ambiguity.

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

validate_functionA
Read-onlyIdempotent

Check if a Pine Script v6 function name is valid.

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

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A3.8/5.0
Behavior3/5

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

Annotations already indicate readOnlyHint and idempotentHint, so the tool is safe and idempotent. The description adds that it checks validity, but does not elaborate on return format, error cases, or behavioral details beyond what annotations provide.

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?

A single, concise sentence that immediately communicates the tool's purpose. No redundant information.

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?

For a simple validation tool with one parameter and an output schema, the description adequately conveys purpose. Some additional context about valid function name conventions (e.g., must be from Pine Script v6) could enhance completeness, but schema examples mitigate this.

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 input schema has 100% coverage with a clear description of 'fn_name' and examples. The description adds no additional parameter meaning, so it meets the baseline for high schema coverage.

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 it validates a Pine Script v6 function name, using a specific verb ('Check') and resource. This distinguishes it from sibling tools like get_functions (which lists functions) and search_docs (which searches documentation).

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?

The description does not provide explicit guidance on when to use this tool versus alternatives, such as get_functions or search_docs. The purpose is self-explanatory, but no exclusions or context for when validation is needed.

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

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 2 tool updatesv0.7.5
    • Changedresolve_topic7 fields changed
      • removedOutput schema / description
        Removed value: -"Result of resolving a topic query."
      • removedOutput schema / properties / matches
        Removed value: -{
        -  "items": {
        -    "description": "A matched documentation topic.",
        -    "properties": {
        -      "matched_keywords": {
        -        "items": {
        -          "type": "string"
        -        },
        -        "type": "array"
        -      },
        -      "path": {
        -        "type": "string"
        -      },
        -      "read_with": {
        -        "default": [],
        -        "items": {
        -          "type": "string"
        -        },
        -        "type": "array"
        -      },
        -      "score": {
        -        "type": "integer"
        -      }
        -    },
        -    "required": [
        -      "path",
        -      "matched_keywords",
        -      "score"
        -    ],
        -    "type": "object"
        -  },
        -  "type": "array"
        -}
      • removedOutput schema / properties / query
        Removed value: -{
        -  "type": "string"
        -}
      • addedOutput schema / properties / result
        Added value: +{
        +  "type": "string"
        +}
      • removedOutput schema / properties / suggestion
        Removed value: -{
        -  "type": "string"
        -}
      • changedOutput schema / required
        Previous value: -[
        -  "matches",
        -  "query",
        -  "suggestion"
        -]New value: +[
        +  "result"
        +]
      • addedOutput schema / x-fastmcp-wrap-result
        Added value: +true
    • Changedvalidate_function8 fields changed
      • removedOutput schema / description
        Removed value: -"Result of validating a Pine Script function name."
      • removedOutput schema / properties / function
        Removed value: -{
        -  "type": "string"
        -}
      • addedOutput schema / properties / result
        Added value: +{
        +  "type": "string"
        +}
      • removedOutput schema / properties / suggestion
        Removed value: -{
        -  "anyOf": [
        -    {
        -      "type": "string"
        -    },
        -    {
        -      "type": "null"
        -    }
        -  ],
        -  "default": null
        -}
      • removedOutput schema / properties / type
        Removed value: -{
        -  "anyOf": [
        -    {
        -      "enum": [
        -        "namespaced",
        -        "toplevel"
        -      ],
        -      "type": "string"
        -    },
        -    {
        -      "type": "null"
        -    }
        -  ]
        -}
      • removedOutput schema / properties / valid
        Removed value: -{
        -  "type": "boolean"
        -}
      • changedOutput schema / required
        Previous value: -[
        -  "valid",
        -  "type",
        -  "function"
        -]New value: +[
        +  "result"
        +]
      • addedOutput schema / x-fastmcp-wrap-result
        Added value: +true
  2. 10 tool updates
    • Addedget_doc
    • Addedget_functions
    • Addedget_prompt
    • Addedget_section
    • Addedlist_docs
    • Addedlist_prompts
    • Addedlist_sections
    • Addedresolve_topic
    • Addedsearch_docs
    • Addedvalidate_function
  3. 10 tool updatesv0.7.4
    • Removedget_doc
    • Removedget_functions
    • Removedget_prompt
    • Removedget_section
    • Removedlist_docs
    • Removedlist_prompts
    • Removedlist_sections
    • Removedresolve_topic
    • Removedsearch_docs
    • Removedvalidate_function
  4. 11 tool updates
    • Removededit_and_lint
    • Changedget_doc3 fields changed
      • addedInput schema / properties / limit / description
        Added value: +"Maximum characters to return. Use 30000 for large files to avoid token limits."
      • addedInput schema / properties / offset / description
        Added value: +"Character offset to start reading from (default: 0)"
      • addedInput schema / properties / path / description
        Added value: +"Relative path to the documentation file (e.g., \"reference/functions/ta.md\")"
    • Changedget_functions1 field changed
      • addedInput schema / properties / namespace / description
        Added value: +"Filter by namespace (e.g., \"ta\", \"strategy\", \"request\").\n       Empty string returns all functions grouped by namespace."
    • Changedget_section3 fields changed
      • addedInput schema / properties / header / description
        Added value: +"Header text to find (e.g., \"strategy.exit()\" or \"## strategy.exit()\")"
      • addedInput schema / properties / include_children / description
        Added value: +"Include nested subsections under the header (default: True)"
      • addedInput schema / properties / path / description
        Added value: +"Documentation file path (e.g., \"reference/functions/strategy.md\")"
    • Removedlint_script
    • Removedlist_resources
    • Changedlist_sections1 field changed
      • addedInput schema / properties / path / description
        Added value: +"Documentation file path (e.g., \"reference/functions/ta.md\")"
    • Removedread_resource
    • Changedresolve_topic1 field changed
      • addedInput schema / properties / query / description
        Added value: +"Exact Pine Script term or known concept keyword."
    • Changedsearch_docs2 fields changed
      • addedInput schema / properties / max_results / description
        Added value: +"Maximum sections to return (default: 5)"
      • addedInput schema / properties / query / description
        Added value: +"Exact string to search for (case-insensitive)."
    • Changedvalidate_function1 field changed
      • addedInput schema / properties / fn_name / description
        Added value: +"Function name to validate (e.g., \"ta.sma\", \"strategy.entry\", \"plot\")"
  5. 14 tool updatesv0.6.17
    • First observededit_and_lint
    • First observedget_doc
    • First observedget_functions
    • First observedget_prompt
    • First observedget_section
    • First observedlint_script
    • First observedlist_docs
    • First observedlist_prompts
    • First observedlist_resources
    • First observedlist_sections
    • First observedread_resource
    • First observedresolve_topic
    • First observedsearch_docs
    • First observedvalidate_function

TDQS

A4.4/5.0

Scored across 10 tools

Disambiguation5/5

Every tool has a clearly distinct purpose: reading full docs, listing docs/sections/prompts, searching, resolving specific terms, validating function names. No overlap in functionality.

Naming Consistency5/5

All tools follow a consistent verb_noun snake_case pattern (e.g., get_doc, list_sections, validate_function). No mixing of conventions.

Tool Count5/5

With 10 tools, the server is well-scoped for its documentation purpose. Covers browsing, reading, searching, and utility without being excessive or insufficient.

Completeness5/5

The tool surface covers all major documentation needs: listing, reading, searching, and validating. There are no obvious gaps for a Pine Script docs server.

Maintenance

ActivityInactive
ResponsivenessUnresponsive

Related MCP Connectors

Related MCP Servers