Skip to content
Merged
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
2 changes: 1 addition & 1 deletion apps/portal/src/app/ai/mcp/page.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ Currently, the following tools are available:
- `paymentsPurchase`
- `getPaymentHistory`
- `fetchWithPayment`
- `listDiscoveryResources`
- `listPayableServices`
- `createToken`
- `listTokens`
- `getTokenOwners`
Expand Down
10 changes: 5 additions & 5 deletions apps/portal/src/app/payments/x402/agents/page.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ The easiest way to equip your agents with the ability to pay for API calls is to

The MCP server comes with all the tools by default, but you can filter the tools available by passing a comma-separated list of tools as a query parameter.

In this example, we create a ReAct agent using LangChain and filter the MCP tools to `fetchWithPayment` and `listDiscoveryResources` as the only 2 tools we give our agent. You can view the full list of available tools [here](/ai/mcp#available-tools).
In this example, we create a ReAct agent using LangChain and filter the MCP tools to `fetchWithPayment` and `listPayableServices` as the only 2 tools we give our agent. You can view the full list of available tools [here](/ai/mcp#available-tools).

<Tabs defaultValue="typescript">

Expand All @@ -42,7 +42,7 @@ const model = new ChatOpenAI({

const mcpServers = {
thirdweb: {
url: `https://api.thirdweb.com/mcp?secretKey=<your-project-secret-key>&tools=fetchWithPayment,listDiscoveryResources`
url: `https://api.thirdweb.com/mcp?secretKey=<your-project-secret-key>&tools=fetchWithPayment,listPayableServices`
}
};

Expand All @@ -53,7 +53,7 @@ const tools = await client.getTools();
const agent = createReactAgent({
llm: model,
tools: tools,
prompt: "Use the fetchWithPayment tool to fetch any endpoint. Discover the available endpoints with the listDiscoveryResources tool."
prompt: "Use the fetchWithPayment tool to fetch any endpoint. Discover the available endpoints with the listPayableServices tool."
});
```

Expand All @@ -68,12 +68,12 @@ from langgraph.prebuilt import create_react_agent
client = MultiServerMCPClient(
{
"thirdweb": {
"url": "https://api.thirdweb.com/mcp?secretKey=<your-project-secret-key>&tools=fetchWithPayment,listDiscoveryResources",
"url": "https://api.thirdweb.com/mcp?secretKey=<your-project-secret-key>&tools=fetchWithPayment,listPayableServices",
}
}
)
tools = await client.get_tools()
agent = create_react_agent("openai:gpt-4.1", tools, prompt="Use the fetchWithPayment tool to fetch any endpoint. Discover the available endpoints with the listDiscoveryResources tool.")
agent = create_react_agent("openai:gpt-4.1", tools, prompt="Use the fetchWithPayment tool to fetch any endpoint. Discover the available endpoints with the listPayableServices tool.")
```

</TabsContent>
Expand Down
Loading