ChartnautDocs

MCP tools reference

Chartnaut's MCP server at https://api.chartnaut.com/v1/mcp offers 28 tools (plus two old names kept for one release), 4 prompts and the scripting reference as resources. This page lists each one with every input, its default and limits, what it returns, the API endpoints behind it and what it costs. You rarely call these yourself: the AI app picks them. Read this page to know what the app can do, or to build your own MCP client.

How the tools work

Each tool call is served as one or more ordinary API requests, made as you with the connection's token or API key. Everything the API enforces applies: scopes, your plan's API limits, heavy calls, plan caps and ownership. A tool can do nothing the endpoints behind it cannot. How the MCP server works follows one call through.

  • Inputs are checked first. A malformed ref, slug, run id or kind is refused with Error invalid_request before any request is made, and costs nothing.

  • Requests a minute. Each API request a tool makes counts once. Connecting and listing the tools count nothing. Limits and cost has the table.

  • Scopes. Each tool below names the scope it needs. Permissions and connected apps

  • Waiting. No tool holds for more than 25 seconds. A run still going after that comes back with its id and a next_step, and the app asks again with get_run.

  • Next steps. Run and collection answers carry a next_step field that tells the model which tool to call next, with the arguments filled in.

  • Untrusted text. Names, descriptions, tags and categories of other people's scripts come back inside untrusted_author_text, with a note telling the model to treat them as data. Your own scripts and Chartnaut's built-ins are returned as they are.

  • Output. Every result is one text item: compact JSON, or markdown for doc pages, at most 40 KB. Output limits

Tools at a glance

Tool

Does

Scope

Requests

Changes your account

search_docs

Finds scripting reference topics

scripts:read

1

No

get_doc

Reads one topic

scripts:read

1

No

search_library

Finds scripts you can run

scripts:read

1

No

describe_script

Settings, outputs and events of a library script

scripts:read

1

No

add_to_library

Shows what adding another author's script would add, then adds it once you agree

scripts:read, then scripts:write

1

Only with confirm

remove_from_library

Takes a script you added out of your library

scripts:write

1

Yes

list_my_scripts

Lists your scripts

scripts:read

1

No

get_script

Reads one of your scripts, source included

scripts:read

1

No

validate_script

Checks a script without saving it

scripts:read

1, heavy

No

save_script

Creates a script or saves a version

scripts:write

1 or 2, one heavy

Yes

run_script

Runs a saved or inline script

runs:write

2, one heavy

Yes, starts a run

get_run

A run's status, failure and summary

scripts:read

1

No

get_results

What a run produced

scripts:read

1 to 4

No

definition_events

A definition's stored events

scripts:read

1 to 4

No

run_definition_over_history

Runs a definition over a window and stores its events

runs:write

1 plus 1 every 3 s, one heavy

Yes

create_forward_insight

Saves a study run to your library as a Forward Insight

scripts:write

1, heavy

Yes, unless a dry run

list_forward_insights

Lists your Forward Insights

scripts:read

1 to 4

No

update_forward_insight

Renames a Forward Insight or changes its description

scripts:write

1

Yes

activate_forward_insight

Makes a Forward Insight active on your charts. Activate a Forward Insight

scripts:write

1

Yes

deactivate_forward_insight

Stops a Forward Insight showing on your charts. Deactivate a Forward Insight

scripts:write

1

Yes

remove_forward_insight

Archives a Forward Insight from your library

scripts:write

1

Yes

list_instruments

Instruments and the dates your plan reaches

scripts:read

1

No

list_datasets

The reference data a script can read

scripts:read

1

No

find_calendar_codes

Economic calendar codes to filter on

scripts:read

1

No

account

Your plan, scopes and usage

scripts:read

2

No

list_projects

Your developer projects

apps:write

1

No

create_project

A new developer project, with its first Test key

apps:write

1

Yes

create_test_key

A new Test key for one of your projects

apps:write

1

Yes

Tools that change nothing carry MCP's read-only hint, which some apps use to run them without asking you first. Ten of the twelve that can change your account are marked as not destructive. remove_forward_insight and remove_from_library are marked destructive, so apps ask you before they run, and the model is told to confirm with you first.

Docs

search_docs

Finds topics in the scripting reference. Each word of the query is matched, ignoring case, against every topic's id and title; topics that match more words come first. With an empty query, it lists the top-level topics.

Input

Type

Default

Description

query

string

Empty

Words to look for, such as moving average, events or settings

Returns topics, up to 25, each with topic (the id for get_doc) and title, and a hint. When nothing matches, the hint says to try other words or an empty query.

Calls List doc topics. Costs 1 request.

get_doc

Reads one topic as markdown, the same page chartnaut docs <topic> prints.

Input

Type

Default

Description

topic

string

Required

A topic id from search_docs, such as indicators/outputs. A leading scripting/ is accepted and dropped

Returns the page as markdown. A page over 40 KB is cut, with a line at the end saying so.

Calls Get a doc topic. Costs 1 request. Errors not_found for an unknown topic, with advice to use search_docs.

Library

search_library

Searches every script you can run: your own, Chartnaut's built-ins and other people's public ones. Never returns source.

Input

Type

Default

Description

q

string

None

Search words. Every word must match the name, slug, description, tags, category or author

kind

string

Any

indicator, definition or study

scope

string

all

all: your library plus community scripts. mine: your own. chartnaut: built-ins. community: other people's public scripts. installed: other people's scripts you added. library: mine, chartnaut and installed. published: your public scripts

author

string

Any

A username, chartnaut for built-ins, or me

limit

integer

20

1 to 100. Higher values are treated as 100

cursor

string

None

next_cursor from the previous page

Returns scripts, each with ref (usable in run_script and describe_script), kind, name, description (cut at 300 characters), author, official, owned, installed, latest_version, adoptions, tags and category, and next_cursor. For other people's scripts, name, description, tags and category sit inside untrusted_author_text.

Calls Search the library. Costs 1 request.

describe_script

Describes one library script: its settings, outputs or events, and dependencies. Never source, even for your own scripts; use get_script for that.

Input

Type

Default

Description

ref

string

Required

author/slug, author/slug@N, chartnaut/slug for a built-in, or a bare slug for your own

kind

string

None

Only when one of your studies shares the slug with an indicator or definition

Returns the Library script object without files, with other people's text inside untrusted_author_text.

Calls Get a library script. Costs 1 request. Errors not_found; conflict when the slug is ambiguous and kind is missing.

add_to_library

Adds another author's indicator or definition to your library, with the scripts it reads, as Add to library does in the app. Their script runs for you only once it is in your library. The tool works in two calls, and the model is told never to add anything without your say-so:

  1. Without confirm, it changes nothing. It returns what adding would add, and a next_step telling the model to show you the list and ask.

  2. Only after you agree, the model calls it again with confirm set to the list it was given, and the script is added.

Adding never copies anything: each script stays its author's and picks up their edits, and you can remove it at any time. Studies cannot be added; only your own studies run.

Input

Type

Default

Description

ref

string

Required

author/slug, from search_library

confirm

array of string

None

Leave out on the first call. After you agree, the confirm list the first call returned

kind

string

None

Only when the author has more than one script with that slug

Returns without confirm: the requirements, with root, needs, cannot_add, confirm, message and a next_step. When the script is already usable, or something it needs is not shared with you, next_step says to tell you what message says and add nothing. With confirm: added, root, added_with and skipped, and a next_step saying how to run it.

Calls Check what a script needs without confirm, Add to your library with it. Costs 1 request. Scopes scripts:read to look, scripts:write to add. Errors confirmation_required when confirm leaves out something it would add; not_shared; not_installable for a study.

remove_from_library

Takes a script you added out of your library. The scripts that came with it stay. It stops running for you until it is added again. The model is told to confirm with you first.

Input

Type

Default

Description

ref

string

Required

author/slug of a script you added

kind

string

None

indicator or definition, when you added both with that slug

Returns removed, the ref and its kind.

Calls Remove from your library. Costs 1 request. Errors not_found when it is not in your library; invalid_request for your own scripts and built-ins.

Your scripts

list_my_scripts

Lists your own indicators, definitions and studies, without source.

Input

Type

Default

Description

kind

string

Any

indicator, definition or study

q

string

None

Matches part of the slug, name or description

limit

integer

50

1 to 200. Higher values are treated as 200

cursor

string

None

next_cursor from the previous page

Returns scripts, each with slug, kind, name, description, visibility, latest_version and updated_at, and next_cursor.

Calls List scripts. Costs 1 request.

get_script

Reads one of your own scripts. A ref with a / is refused: other people's scripts are read with describe_script, without source.

Input

Type

Default

Description

ref

string

Required

slug for the latest version, or slug@N

include_source

boolean

false

Return the files. Needed before editing

kind

string

None

Only when one of your studies shares the slug

Returns the Script object: its interface, dependencies and latest_version, and with include_source its files, each with path, code and entry. When the whole answer would pass 40 KB, files lists each file's path, entry and size in bytes with no code, and _truncated tells the model not to save over the script from a partial copy.

Calls Get a script. Costs 1 request. Errors not_found, conflict.

validate_script

Lints and resolves a script without saving or running it. It is a heavy call, and uses no run.

Input

Type

Default

Description

kind

string

Required

indicator, definition or study

files

array of file

Required

The complete file set. Each file has path (ending .ts or .js, such as main.ts), code, and entry: true on the one entry file. An indicator has one file

Returns ok, the diagnostics with file, line and severity, and the settings, outputs or events the script declares.

Calls Validate a script. Costs 1 request, heavy.

save_script

Saves a script. Without base_version it creates a new one, and refuses if you already have a script with that slug, naming its latest version and telling the model to read it and save over it with base_version instead. With base_version it saves a new version over that one; if the script changed since, for example in the app, it returns version_conflict and saves nothing. An invalid script is never saved.

Input

Type

Default

Description

kind

string

Required

indicator, definition or study

slug

string

Required

2 to 63 lowercase letters, digits and dashes, starting with a letter or digit. No @version

files

array of file

Required

The complete file set. Files left out are deleted from the new version

base_version

integer

None

The version the edit started from, latest_version from get_script. Required to save over an existing script; omit it to create one

name

string

None

Display name

description

string

None

One or two sentences

change_summary

string

None

What changed, in one line

Returns the saved Script without its files, with saved: true.

Calls to create: Get a script to check the slug is free, then Create a script. To save a version: Save a script version, then Update script details when name or description is given. Costs 2 requests to create; 1 to save a version, 2 with a new name or description. One of them is heavy. Scopes scripts:write; creating also needs scripts:read, for the slug check.

Errors conflict when the slug is taken; version_conflict; script_invalid with the diagnostics; plan_limit past your plan's cap on scripts of that kind.

run_script

Runs a saved script, or inline source without saving it, on one instrument, timeframe and window. Studies run by ref only, so a new study is saved first.

Input

Type

Default

Description

script

string

None

A saved ref: slug, slug@N, author/slug or chartnaut/slug. Pass this, or kind and files, never both

kind

string

None

With files: indicator or definition

files

array of file

None

Inline source to run without saving, in the shape validate_script takes

instrument

string

Required

A symbol such as BTC or ETH. Find one with list_instruments

timeframe

string

Required

1m, 5m, 15m, 30m, 1h, 2h, 4h, 1d, 1w or 1mo (the calendar month)

window

object

Required

Exactly one of: last, a lookback ending now such as 30d, 12w, 6m or 1y; from, with an optional to that defaults to now, both RFC 3339; or bars, the last N bars at the timeframe. At most 50,000 bars

settings

object

Defaults

Setting overrides by id. Settings left out keep their defaults

event_filter

object

None

Study only. Keeps events whose payload matches these values

Returns the Run: id, status, progress, failure with its diagnostics when it failed, the summary when it succeeded, and the first 20 console lines with a console_note giving the total. next_step says to call get_results when it succeeded, get_run when it is still queued or running, and to read failure when it failed.

Calls Create a run with wait set to 0, so starting never holds a heavy-call place while the run executes, then, while the run is not done, Get a run with wait set to 25. If that wait is refused, the tool returns the run as it started and the app polls with get_run. Costs 2 requests, 1 when the run is done as it starts. The start is heavy and the wait is a long poll. The run takes one of your runs at once. Scopes runs:write to start; the wait also needs scripts:read.

Errors unknown_instrument, unsupported_timeframe, out_of_coverage, script_invalid, busy when your run queue is full, plan_limit past a plan cap such as your definition events, and invalid_request for an inline study, a missing window or a trade study. Trade studies run in the app, on every plan. not_in_library when the script, or a definition your study reads, is another author's and not in your library: the model is told to call add_to_library, show you what it would add, and add it only if you agree.

get_run

Returns a run's status, progress, failure with its diagnostics, summary and the first 20 console lines, with a next_step.

Input

Type

Default

Description

run_id

string

Required

The id run_script returned

wait_seconds

integer

0

Hold up to this many seconds, at most 25, for the run to finish

Returns the same shape as run_script.

Calls Get a run. Costs 1 request, a long poll when wait_seconds is set. Past your plan's long polls at once, it answers straight away with the run as it is.

get_results

Reads what a succeeded run produced: an indicator's output series, a definition's events, or a study's result blocks.

Input

Type

Default

Description

run_id

string

Required

A succeeded run's id

outputs

string

All

Indicator. Comma list of output ids

event

string

All

Definition. Only this declared event

keys

string

None

Study. Comma list of result keys to return in full. Large blocks are left out unless named here

from

string

None

Only points or events at or after this time, RFC 3339

to

string

None

Only points or events before this time, RFC 3339

limit

integer

300

Points per output, or events, per page. Up to 50,000

cursor

string

None

next_cursor from the previous page

Returns the run results for the run's kind, with next_cursor. When a page of points or events is over 40 KB, the tool asks again with a smaller limit, up to three times, and adds limit_used and a page_note with the cursor for the next page. Study results are not re-paged; a study answer over 40 KB is cut with a _truncated note, so name the keys you want.

Calls Get run results. Costs 1 request, up to 4 when it shrinks the page. Errors run_not_finished for a run still going, failed or cancelled; not_found with 410 once results have expired after 7 days.

Definition events

definition_events

Reads the events one of your definitions has stored from running over history, across instruments, timeframes and windows. With summary, it returns the totals instead.

Input

Type

Default

Description

definition

string

Required

Your definition's slug

summary

boolean

false

Return totals per instrument and timeframe, the runs still in progress and any that failed, instead of events. Only version applies with it

instrument

string

Any

Only this instrument

timeframe

string

Any

Only this timeframe, one of 1m to 1mo

event

string

Any

Only this declared event

from

string

None

Events starting at or after this time, RFC 3339

to

string

None

Events ending at or before this time, RFC 3339

version

integer

Any

Only events stored by this version

where

array

None

Payload filters, all of which must match. Each has key, op (eq, neq, contains, gt, gte, lt, lte, between, is_empty, is_not_empty), value, and value_to for between

limit

integer

100

1 to 1,000. Lowered to fit 40 KB

cursor

string

None

next_cursor from the previous page

Returns a page of events with next_cursor, and limit_used and page_note when the page was shrunk. With summary, the summary with collecting for runs in progress.

Calls List events, or Summarise events with summary. Costs 1 request, up to 4 when it shrinks the page.

run_definition_over_history

Runs one of your definitions over history on a window and stores its events, so studies and definition_events can read them. Only the part not already stored runs. It waits for the work to finish, checking every 3 seconds.

Input

Type

Default

Description

definition

string

Required

Your definition's slug

instrument

string

Required

A symbol such as BTC

timeframe

string

Required

1m, 5m, 15m, 30m, 1h, 2h, 4h, 1d, 1w or 1mo (the calendar month)

window

object

Required

The same shape as run_script

version

integer

Latest

Definition version

wait_seconds

integer

20

Wait up to this many seconds, at most 25. 0 means the default

Returns collect, the answer from starting; status, done or collecting; summary, the latest summary while it waited; and next_step. When nothing was left to run, it answers done at once. When it is still collecting, next_step says to check later with definition_events and summary.

Calls Run a definition over history, then Summarise events every 3 seconds until nothing is in progress or the wait ends. Costs 1 request to start, heavy, plus 1 per check: at most 8 in all with the default wait, 10 at 25 seconds. It takes no run slot. Stored events count toward your plan's definition events limit. Scopes runs:write; the checks also need scripts:read, and without it the tool answers collecting straight after starting.

Forward Insights

A Forward Insight puts a study's answer on your charts: click one of the definition's events and a card shows what happened after events like it, and while it is active the latest setup shows it by itself. Creating one saves it to your library; activate_forward_insight makes it active, and the model does that only when you ask. Over MCP the model writes the study's pin_cell result itself, following Forward Insights; the agent behind the app's Put on chart is not used, and no AI credits are spent. The forward_insight prompt walks the model through it.

create_forward_insight

Saves a succeeded run of one of your saved studies to your library as a Forward Insight. The study must declare pin_cell as popover_layout and publish one cell per combination of its indexedBy dimensions. The model is told to call it with dry_run first and show you the card.

Input

Type

Default

Description

run

string

Required

A succeeded study run id, from run_script on the study. The insight shows on charts of this run's instrument and timeframe

name

string

Required

What you see on the chart. Up to 120 characters

definition

string

None

Your own definition's slug. Only needed when the study reads more than one

description

string

None

One or two sentences on what the card answers

replace

boolean

true

Replaces your insight with the same name on that definition. false refuses instead

dry_run

boolean

false

Check everything and return the preview card without saving

Returns result, the API's answer: with dry_run, the definition, the breakdown dimensions and the preview card; otherwise the Forward Insight with its preview. next_step says to show you the card and ask before saving, or, once saved, that it is in your library and shows once it is active on a chart of its market and timeframe.

Calls Create a Forward Insight. Costs 1 request, heavy. It starts no run. Errors script_invalid when the study does not meet the contract, with details.fix naming the change: the model fixes the study, saves it, runs it again and retries with the new run. run_not_finished, forbidden for someone else's definition, conflict with replace off, plan_limit when your library is at your plan's Forward Insight limit.

list_forward_insights

Lists your Forward Insights, the most recently changed first.

Input

Type

Default

Description

definition

string

Any

Only insights on this definition slug

study

string

Any

Only insights made from this study slug

instrument

string

Any

Only insights on this instrument, such as BTC

timeframe

string

Any

Only insights on this timeframe, one of 1m to 1mo

limit

integer

20

1 to 100. Lowered to fit 40 KB

cursor

string

None

next_cursor from the previous page

Returns data, each a Forward Insight with its name, definition, study and version, instrument, timeframe, profile, breakdown dimensions and window, and next_cursor, with limit_used and page_note when the page was shrunk.

Calls List Forward Insights. Costs 1 request, up to 4 when it shrinks the page.

update_forward_insight

Renames a Forward Insight or changes its description. To change its numbers, the model updates the study, runs it again and calls create_forward_insight with the same name.

Input

Type

Default

Description

insight

string

Required

The insight's id, such as ins_842, from list_forward_insights

name

string

None

New name

description

string

None

New description

Returns the updated Forward Insight.

Calls Update a Forward Insight. Costs 1 request. Errors invalid_request before any request when neither name nor description is given.

remove_forward_insight

Archives a Forward Insight from your library, which also stops it showing on your charts. The study and its runs are kept. The model is told to confirm with you first.

Input

Type

Default

Description

insight

string

Required

The insight's id, such as ins_842, from list_forward_insights

Returns removed with the id.

Calls Remove a Forward Insight. Costs 1 request.

Catalogue and account

list_instruments

Finds instruments to run on, with the dates your plan can reach on each.

Input

Type

Default

Description

q

string

None

Matches the symbol, short symbol and name, such as bitcoin

category

string

Any

Such as crypto or fx

limit

integer

25

1 to 100. Higher values are treated as 100

cursor

string

None

next_cursor from the previous page

Returns instruments, each with symbol, short, name, category, order_flow and coverage (start and end your plan reaches, and live when the instrument has a live feed, whose end is now), and next_cursor. The instrument object

Calls Search instruments. Costs 1 request.

list_datasets

Lists the reference data a script can read with dataset(): the economic calendar, daily rates and yields, options levels and options contracts, with their fields, the fields you can filter on and the plan each needs right now. It takes no inputs.

Calls GET /datasets. Costs 1 request.

find_calendar_codes

Searches the economic calendar's indicator codes, so a script filters on a real code instead of a guessed one.

Input

Type

Default

Description

query

string

Required

Words from the release name or code, such as nonfarm payrolls or CPI

country

string

Any

Two letters, such as US, UK or JP. EU is the euro area

Calls GET /datasets/econ.calendar/codes. Costs 1 request.

account

Returns who the connection acts as and what the plan allows. It takes no inputs.

Returns me, with your user name, plan and token: the connection's name, scopes and expires_at. For a browser sign-in, the name is the app's and the expiry is the current access token's, within the hour. usage holds the plan, this month's period, compute_units used, caps for indicators, definitions, studies, events and concurrent_runs, each with used and limit, history_start, memory_bars, and api_limits with requests_per_minute, concurrent_heavy and concurrent_waits.

Calls Get the current key and Get usage. Costs 2 requests.

Developer projects

These three build on the Terminal SDK: an AI app can make you a project and a Test key while it writes your integration. A project is the Chartnaut side of what you build: its keys, sites and webhooks. They need a connection that granted apps:write ("Create and manage your developer projects"), which is never given by default.

They never make Live keys, by design: Live keys are made only in Developers, in your browser. Asked for one, they answer live_keys_browser_only with the page's address.

list_apps and create_app are the old names of list_projects and create_project. They still work for one release and do the same thing.

list_projects

Lists the projects you own or are on the team of, each with its slug, name, your role, its Test sites and how far it is from Live, plus how many projects your plan allows.

Calls GET /v1/projects. Costs 1 request.

create_project

Creates a project from a name and returns it with its first Test key. The key's secret is shown this once: the model is told to have you store it, as CHARTNAUT_SECRET_KEY in your project folder's .env.local, and that it won't be shown again.

Calls POST /v1/projects. Costs 1 request. Refused with app_limit past your plan's projects, and rate_limited past 5 new projects a day.

create_test_key

Makes another Test key for one of your projects, shown once like create_project's.

Input

Type

Default

Description

project

string

Required

The project's slug, from list_projects or create_project, such as acme-desk-k3p9. app is still accepted

name

string

None

A label for the key, such as laptop or CI

Calls POST /v1/projects/{slug}/keys. Costs 1 request. Refused with key_limit at 20 Test keys.

Prompts

Prompts are ready-made requests the app can offer you, often as a menu or a slash command. Each one steers the model through the right tools in order. Fetching a prompt costs nothing; the tool calls it leads to cost as usual. What you can ask shows them in use.

Prompt

Arguments

What it asks for

write_indicator

idea (required), instrument (default BTC)

Check the library for an existing one, read the reference, validate until clean, try it on 30 days of 1-hour bars without saving, and ask before saving

test_trading_idea

idea (required), instrument (default BTC), timeframe (default 1h)

Turn the idea into testable conditions, write a definition, run it over the last year, report how often it fired and what followed, with the caveats, and offer to save it and run it over more history

forward_insight

study (empty writes a new one), question, instrument (default BTC), timeframe (default 1h)

Read the Forward Insights contract, write pin_cell into the study, validate and save it, run it over 2 years, check one pin_cell row per combination, dry-run create_forward_insight and show you the card, then create it when you approve

explain_run

run_id (required)

Explain a failure and propose a fix, or explain the results without inventing numbers, then say what to try next

Resources

The scripting reference is also available as resources, for apps that let you attach them to a chat:

URI

Contents

chartnaut://docs

Every topic, as a markdown list of links, indented by depth

chartnaut://docs/{topic}

One topic as markdown, such as chartnaut://docs/indicators/outputs

Reading a resource makes the same API request as search_docs or get_doc, and counts the same way. An unknown topic answers MCP's resource-not-found error.

Output limits

A tool result is at most 40 KB of text, so one answer never floods the model's context.

  • Lists come in pages. Pass next_cursor back as cursor for the next one.

  • Results and events lower the page size until the answer fits, and say so with limit_used and a page_note.

  • Anything else over 40 KB is cut: the longest lists are shortened first, then the longest text, and a _truncated field says what was cut and how to ask for less.

  • Source is never cut, so a model never saves over a script from a partial copy. get_script returns no code at all when the answer would pass 40 KB.

  • Doc pages over 40 KB end with a note that the rest was cut.

  • Errors carry the first 30 diagnostics, with a count of the rest.

  • Library descriptions are cut at 300 characters, and run console output at 20 lines.

One MCP request can carry up to 3 MB, enough for a script's full 2 MB of files.

Errors

A refused tool call comes back as a result with isError: true and a text the model can read: Error <code>: with the API's message, then advice on what to do next, then any details and diagnostics. The codes are the API's own, listed in Errors and exit codes.

Code

What the model is told

plan_limit

A limit of your plan. Tell you, and do not retry

forbidden_scope

The connection lacks the permission. Tell you to reconnect and allow it, or use a key with that scope

busy

Too many heavy calls or runs at once. Wait for the Retry-After seconds and retry once, never in a tight loop

rate_limited

Past your requests a minute. Wait the Retry-After seconds before the next call

version_conflict

The script changed since base_version, probably in the app. Read it again with its source, re-apply the change, and save with the latest version

conflict

The slug is already one of your scripts, or it names more than one of your scripts: pass kind

script_invalid

Nothing was saved or run. Fix the diagnostics, which follow in the error

not_found

Check the ref or id: your own scripts with list_my_scripts, others with search_library, docs with search_docs

run_not_finished

Call get_run until the run succeeds. A failed or cancelled run has no results

unknown_instrument, out_of_coverage

Find the symbol and its dates with list_instruments

unsupported_timeframe

The timeframes are 1m 5m 15m 30m 1h 2h 4h 1d 1w 1mo

in_use

Another of your scripts depends on this one

not_in_library

Another author's script runs only once it is in your library. Call add_to_library to see what it would add, show you, and add it only if you agree; then run again

confirmation_required

Nothing was added. Show you the scripts in details.needs and ask; only if you agree, call add_to_library again with confirm

not_shared

Something it needs is not shared with you, so it cannot be added or run. Tell you, and do not retry

not_installable

Studies cannot be added to a library. Tell you

invalid_request

An input is malformed. The message names it

unauthorized

The connection was refused. You need to connect again

internal

A Chartnaut server error. Retry once, then tell you

Before a tool runs at all, the MCP endpoint itself answers 401 with a WWW-Authenticate header when the token is missing, expired or revoked, which starts the app's sign-in; and 403 forbidden for a browser request from a site Chartnaut does not recognise. Call the MCP server has the details, and Troubleshooting MCP what to do about each.