Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions libs/arcade-cli/arcade_cli/toolkit_docs/docs_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,8 +283,6 @@ def build_tool_spec(
)
referenced_enums, parameters = build_tool_parameters(
tool_input=tool.input,
docs_section=docs_section,
toolkit_name=tool.toolkit.name.lower(),
enums=enums,
tool_parameter_template=tool_parameter_template,
)
Expand Down Expand Up @@ -322,8 +320,6 @@ def build_tool_secrets(

def build_tool_parameters(
tool_input: ToolInput,
docs_section: str,
toolkit_name: str,
enums: dict[str, type[Enum]],
tool_parameter_template: str = TOOL_PARAMETER,
) -> tuple[list[tuple[str, type[Enum]]], str]:
Expand All @@ -334,7 +330,7 @@ def build_tool_parameters(
if schema.enum:
enum_name, enum_class = find_enum_by_options(enums, schema.enum)
referenced_enums.append((enum_name, enum_class))
param_definition = f"`Enum` [{enum_name}](/mcp-servers/{docs_section}/{toolkit_name}/reference#{enum_name})"
param_definition = f"`Enum` [{enum_name}](#{enum_name.lower().replace(' ', '-')})"
else:
if schema.inner_val_type:
param_definition = f"`{schema.val_type}[{schema.inner_val_type}]`"
Expand Down
9 changes: 6 additions & 3 deletions libs/arcade-cli/arcade_cli/toolkit_docs/templates.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@

TOOL_SPEC_SECRETS = """**Secrets**

This tool requires the following secrets: {secrets} (learn how to [configure secrets](/home/build-tools/create-a-tool-with-secrets#set-the-secret-in-the-arcade-dashboard))
This tool requires the following secrets: {secrets} (learn how to [configure secrets](/home/build-tools/create-a-tool-with-secrets))
"""

TABBED_EXAMPLES_LIST = """<TabbedCodeBlock
Expand Down Expand Up @@ -104,7 +104,10 @@
const TOOL_NAME = "{tool_fully_qualified_name}";

// Start the authorization process
const authResponse = await client.tools.authorize({{tool_name: TOOL_NAME}});
const authResponse = await client.tools.authorize({{
tool_name: TOOL_NAME,
user_id: USER_ID,
}});

if (authResponse.status !== "completed") {{
console.log(`Click this link to authorize: ${{authResponse.url}}`);
Expand Down Expand Up @@ -160,7 +163,7 @@
{enum_items}
"""

ENUM_ITEM = """## {enum_name}
ENUM_ITEM = """### {enum_name}

{enum_values}
"""
Expand Down