Skip to content

Commit dfcd056

Browse files
Add overview pages for documentation sections with auto-updating subpage lists (#636)
* add overview pages to deeply nested subsections * adds further overview pages --------- Co-authored-by: Rachel Lee Nabors <nearestnabors@users.noreply.github.com>
1 parent aa2741c commit dfcd056

20 files changed

Lines changed: 339 additions & 8 deletions

File tree

app/_components/SubpageList.tsx

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
import Link from "next/link";
2+
3+
interface SubpageListProps {
4+
basePath: string;
5+
meta: Record<string, any>;
6+
}
7+
8+
export function SubpageList({ basePath, meta }: SubpageListProps) {
9+
const subpages = Object.entries(meta).filter(([key]) => key !== "index");
10+
11+
return (
12+
<ul className="x:ms-[1.5em] x:not-first:mt-[1.25em] x:list-disc x:[:is(ol,ul)_&]:my-[.75em]">
13+
{subpages.map(([key, title]) => {
14+
const linkText =
15+
typeof title === "string"
16+
? title
17+
: typeof title === "object" && title !== null && "title" in title
18+
? (title as { title: string }).title
19+
: String(title);
20+
return (
21+
<li className="x:my-[.5em]" key={key}>
22+
<Link
23+
className="x:focus-visible:nextra-focus x:text-primary-600 x:underline x:decoration-from-font x:[text-underline-position:from-font] x:hover:no-underline"
24+
href={`${basePath}/${key}`}
25+
>
26+
{linkText}
27+
</Link>
28+
</li>
29+
);
30+
})}
31+
</ul>
32+
);
33+
}

app/en/guides/create-tools/_meta.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,11 @@ import type { MetaRecord } from "nextra";
33
export const meta: MetaRecord = {
44
"tool-basics": {
55
title: "Build a tool",
6+
href: "/guides/create-tools/tool-basics",
67
},
78
"evaluate-tools": {
89
title: "Evaluate tools",
10+
href: "/guides/create-tools/evaluate-tools",
911
},
1012
improve: {
1113
title: "Improve an existing toolkit",
@@ -15,6 +17,7 @@ export const meta: MetaRecord = {
1517
},
1618
"error-handling": {
1719
title: "Handle errors",
20+
href: "/guides/create-tools/error-handling",
1821
},
1922
"migrate-toolkits": {
2023
title: "Migrate from toolkits to MCP servers",
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import type { MetaRecord } from "nextra";
2+
3+
const meta: MetaRecord = {
4+
"*": {
5+
theme: {
6+
breadcrumb: true,
7+
toc: true,
8+
copyPage: true,
9+
},
10+
},
11+
index: {
12+
title: "Overview",
13+
},
14+
"retry-tools": {
15+
title: "Retry Tools with Improved Prompt",
16+
},
17+
"useful-tool-errors": {
18+
title: "Provide Useful Tool Errors",
19+
},
20+
};
21+
22+
export default meta;
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
title: "Handle Errors"
3+
description: "Learn how to implement robust error handling in your tools for better user experience"
4+
---
5+
6+
import { SubpageList } from '../../../../_components/SubpageList';
7+
import meta from './_meta';
8+
9+
# Handle Errors
10+
11+
Learn how to implement robust error handling that improves user experience and enables smart retry behavior. Apply these patterns as you develop tools to make them more resilient and user-friendly in production.
12+
13+
Robust error handling is crucial for building reliable tools that provide great user experiences. Arcade provides a comprehensive error handling system that helps you manage different types of errors gracefully.
14+
15+
<SubpageList basePath="/guides/create-tools/error-handling" meta={meta} />

app/en/guides/create-tools/evaluate-tools/_meta.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ const meta: MetaRecord = {
88
copyPage: true,
99
},
1010
},
11+
index: {
12+
title: "Overview",
13+
},
1114
"why-evaluate": {
1215
title: "Why evaluate tools?",
1316
},
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
title: "Evaluate Tools"
3+
description: "Learn how to systematically test and improve your tools with Arcade's evaluation framework"
4+
---
5+
6+
import { SubpageList } from '../../../../_components/SubpageList';
7+
import meta from './_meta';
8+
9+
# Evaluate Tools
10+
11+
Learn how to systematically test and improve your tools to ensure they work reliably in production. Use these techniques after you've built your initial tools to validate their performance and guide iterative improvements.
12+
13+
<SubpageList basePath="/guides/create-tools/evaluate-tools" meta={meta} />

app/en/guides/create-tools/tool-basics/_meta.tsx

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
11
import type { MetaRecord } from "nextra";
22

3-
export const meta: MetaRecord = {
3+
const meta: MetaRecord = {
4+
"*": {
5+
theme: {
6+
breadcrumb: true,
7+
toc: true,
8+
copyPage: true,
9+
},
10+
},
11+
index: {
12+
title: "Overview",
13+
},
414
"compare-server-types": {
515
title: "Compare MCP server types",
616
},
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
title: "Build a Tool"
3+
description: "Learn the fundamentals of building tools with Arcade's MCP Server framework"
4+
---
5+
6+
import { SubpageList } from '../../../../_components/SubpageList';
7+
import meta from './_meta';
8+
9+
# Build a Tool
10+
11+
Learn how to create custom tools that extend AI agents with powerful capabilities. Start here when you're ready to build your first tool or need to add new functionality to your existing MCP servers.
12+
13+
Building tools with Arcade allows you to extend AI agents with custom capabilities. This section covers everything you need to know about creating powerful, reusable tools using the Model Context Protocol (MCP).
14+
15+
<SubpageList basePath="/guides/create-tools/tool-basics" meta={meta} />

app/en/guides/security/_meta.tsx

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import type { MetaRecord } from "nextra";
2+
3+
const meta: MetaRecord = {
4+
"*": {
5+
theme: {
6+
breadcrumb: true,
7+
toc: true,
8+
copyPage: true,
9+
},
10+
},
11+
index: {
12+
title: "Overview",
13+
},
14+
"securing-arcade-mcp": {
15+
title: "Securing Arcade MCP",
16+
},
17+
"secure-your-mcp-server": {
18+
title: "Secure your MCP server",
19+
},
20+
"security-research-program": {
21+
title: "Security research program",
22+
},
23+
};
24+
25+
export default meta;

app/en/guides/security/page.mdx

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
title: "Security"
3+
description: "Learn about security best practices for MCP servers and Arcade tools, plus information about our security research program"
4+
---
5+
6+
import { SubpageList } from '../../../_components/SubpageList';
7+
import meta from './_meta';
8+
9+
# Security
10+
11+
Learn about security best practices for building and deploying secure MCP servers and Arcade tools. Use these resources when implementing production-ready tools that handle sensitive data or require robust security measures.
12+
13+
Security is crucial when building tools that interact with external services, handle user data, or operate in production environments. Arcade provides comprehensive security guidance and actively maintains a security research program.
14+
15+
<SubpageList basePath="/guides/security" meta={meta} />

0 commit comments

Comments
 (0)