Chart templates: saved from a chart, applied, renamed, deleted, and set as the default for a timeframe.
Reached from a connected client as client.template in Python, client.template in JavaScript, client.template() in Rust — each tool below shows its call in every language.
template_apply#
Apply a template
Applies a saved template — or blank, no studies — to a chart or every chart of its workbench, as the templates menu does; what could not be applied is said, one line each. Answers the chart and those lines.
| Argument | Type | Required | Default | What it is |
|---|---|---|---|---|
all_charts | boolean | — | false | Onto every chart of the chart's workbench, as the menu's All switch. |
blank | boolean | — | false | |
chart | string | yes | — | |
name | string | — | — | The template's name; absent with blank, which takes every study off. |
MCP
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "template_apply",
"arguments": {
"chart": "…"
},
"_meta": {
"io.modelcontextprotocol/protocolVersion": "2026-07-28",
"io.modelcontextprotocol/clientCapabilities": {}
}
}
}Python
client.template
def apply(self, chart: str, *, all_charts: Optional[bool] = None, blank: Optional[bool] = None, name: Optional[str] = None) -> Dict[str, Any]JavaScript
client.template
apply(args)C#
client.Template
public Task<JsonNode?> Apply(string chart, bool? allCharts = null, bool? blank = null, string? name = null, CancellationToken ct = default)Go
client.Template
func (a *TemplateAPI) Apply(ctx context.Context, args TemplateApplyArgs) (any, error)Java
client.template
public Object apply(ApplyArgs args)C++
client.template
Json apply(const ApplyArgs &args)Julia
client.template
apply = (chart; all_charts = nothing, blank = nothing, name = nothing)R
client$template
`apply` = function(chart, all_charts = NULL, blank = NULL, name = NULL)Rust
client.template()
pub fn apply(&self, args: TemplateApplyArgs) -> Result<Value, Error>template_delete#
Delete a template
Deletes a saved template, as its row's x and the confirmation do — only with confirm; without it the answer names what would be deleted. Answers the templates.
| Argument | Type | Required | Default | What it is |
|---|---|---|---|---|
confirm | boolean | — | false | Without it nothing is deleted and the answer says what would be. |
name | string | yes | — |
MCP
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "template_delete",
"arguments": {
"name": "…"
},
"_meta": {
"io.modelcontextprotocol/protocolVersion": "2026-07-28",
"io.modelcontextprotocol/clientCapabilities": {}
}
}
}Python
client.template
def delete(self, name: str, *, confirm: Optional[bool] = None) -> Dict[str, Any]JavaScript
client.template
delete(args)C#
client.Template
public Task<JsonNode?> Delete(string name, bool? confirm = null, CancellationToken ct = default)Go
client.Template
func (a *TemplateAPI) Delete(ctx context.Context, args TemplateDeleteArgs) (any, error)Java
client.template
public Object delete(DeleteArgs args)C++
client.template
Json delete_(const DeleteArgs &args)Julia
client.template
delete = (name; confirm = nothing)R
client$template
`delete` = function(name, confirm = NULL)Rust
client.template()
pub fn delete(&self, args: TemplateDeleteArgs) -> Result<Value, Error>template_rename#
Rename a template
Renames a saved template, as its gear's Rename does. Answers the templates.
| Argument | Type | Required | Default | What it is |
|---|---|---|---|---|
name | string | yes | — | |
to | string | yes | — |
MCP
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "template_rename",
"arguments": {
"name": "…",
"to": "…"
},
"_meta": {
"io.modelcontextprotocol/protocolVersion": "2026-07-28",
"io.modelcontextprotocol/clientCapabilities": {}
}
}
}Python
client.template
def rename(self, name: str, to: str) -> Dict[str, Any]JavaScript
client.template
rename(args)C#
client.Template
public Task<JsonNode?> Rename(string name, string to, CancellationToken ct = default)Go
client.Template
func (a *TemplateAPI) Rename(ctx context.Context, args TemplateRenameArgs) (any, error)Java
client.template
public Object rename(RenameArgs args)C++
client.template
Json rename(const RenameArgs &args)Julia
client.template
rename = (name, to)R
client$template
`rename` = function(name, to)Rust
client.template()
pub fn rename(&self, args: TemplateRenameArgs) -> Result<Value, Error>template_save#
Save a template
Saves a chart's studies — and its type and look with with_type — as a named template, as the templates menu's Save does; a name taken or unusable is refused in its words. Answers the templates.
| Argument | Type | Required | Default | What it is |
|---|---|---|---|---|
chart | string | yes | — | The chart whose studies (and, with with_type, type and look) become the template. |
name | string | yes | — | |
with_type | boolean | — | false | The chart's type and look saved with its studies. |
MCP
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "template_save",
"arguments": {
"chart": "…",
"name": "…"
},
"_meta": {
"io.modelcontextprotocol/protocolVersion": "2026-07-28",
"io.modelcontextprotocol/clientCapabilities": {}
}
}
}Python
client.template
def save(self, chart: str, name: str, *, with_type: Optional[bool] = None) -> Dict[str, Any]JavaScript
client.template
save(args)C#
client.Template
public Task<JsonNode?> Save(string chart, string name, bool? withType = null, CancellationToken ct = default)Go
client.Template
func (a *TemplateAPI) Save(ctx context.Context, args TemplateSaveArgs) (any, error)Java
client.template
public Object save(SaveArgs args)C++
client.template
Json save(const SaveArgs &args)Julia
client.template
save = (chart, name; with_type = nothing)R
client$template
`save` = function(chart, name, with_type = NULL)Rust
client.template()
pub fn save(&self, args: TemplateSaveArgs) -> Result<Value, Error>template_set_default#
Set an interval's default template
Makes a template the one a new chart of an interval opens with, or takes the default off an interval or off every interval a template is the default of, as the template gear's choices do. Answers the templates.
| Argument | Type | Required | Default | What it is |
|---|---|---|---|---|
clear_all | boolean | — | false | Every interval this template is the default of loses it. |
interval | string | — | — | The interval it opens with, as the menu writes it (M1, H4, D1); absent with clear_all. |
name | string | — | — | The template, or absent to make the interval open with none. |
MCP
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "template_set_default",
"arguments": {},
"_meta": {
"io.modelcontextprotocol/protocolVersion": "2026-07-28",
"io.modelcontextprotocol/clientCapabilities": {}
}
}
}Python
client.template
def set_default(self, *, clear_all: Optional[bool] = None, interval: Optional[str] = None, name: Optional[str] = None) -> Dict[str, Any]JavaScript
client.template
setDefault(args)C#
client.Template
public Task<JsonNode?> SetDefault(bool? clearAll = null, string? interval = null, string? name = null, CancellationToken ct = default)Go
client.Template
func (a *TemplateAPI) SetDefault(ctx context.Context, args TemplateSetDefaultArgs) (any, error)Java
client.template
public Object setDefault(SetDefaultArgs args)C++
client.template
Json set_default(const SetDefaultArgs &args)Julia
client.template
set_default = (; clear_all = nothing, interval = nothing, name = nothing)R
client$template
`set_default` = function(clear_all = NULL, interval = NULL, name = NULL)Rust
client.template()
pub fn set_default(&self, args: TemplateSetDefaultArgs) -> Result<Value, Error>