Skip to main content
Glama
LuxAlgo

LuxAlgo Library MCP

Official
by LuxAlgo

Get an indicator's source code

library_get_source_code

Retrieve the complete source code of a TradingView Library indicator by its slug. Get the full code directly for analysis, review, or integration.

Instructions

The full, working source code of a Library indicator (works on TradingView). Kept separate from library_get_indicator because sources are long — call it only when the user wants the code itself.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
slugYesIndicator slug

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv1.4.0
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • removedInput schema / additionalProperties
      Removed value: -false
  2. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations, the description carries the full behavioral burden. It discloses that the output is the full working source code, that it works on TradingView, and importantly that sources are long, implying a potentially large response. It does not mention error behavior or output formatting, but the core behavioral traits are covered.

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 concise sentences deliver the resource, the key differentiating behavior, and explicit usage guidance with no wasted words. The most decision-relevant information appears first.

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 one-parameter read tool with no output schema, the description adequately describes the returned artifact: the full working source code. It also adds the important context that this is a TradingView indicator and that responses can be long. Slightly more detail about what happens for an invalid slug would push this higher, but the current content is sufficient for correct invocation.

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 already documents the only parameter, slug, with 100% coverage. The description adds only that the slug refers to a Library indicator, which is marginal. Per the schema-coverage baseline, a 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 identifies the specific verb+resource: retrieving the full working source code of a Library indicator. It also explicitly differentiates itself from the sibling library_get_indicator, so an agent can immediately tell which tool to select.

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 gives explicit usage guidance: call it only when the user wants the code itself, and explains why it is separate from library_get_indicator because sources are long. This is strong when-to-use and alternative-routing information.

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