Skip to content

Commit c8d6cf0

Browse files
docs(plugin-mcp): clarify example (#14325)
MCP Plugin website docs
1 parent be0943a commit c8d6cf0

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

docs/plugins/mcp.mdx

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: MCP Plugin
33
label: MCP
4-
order: 120
4+
order: 49
55
desc: MCP (Model Context Protocol) capabilities with Payload
66
keywords: plugins, mcp, ai, model context protocol, plugin, payload, cms
77
---
@@ -86,18 +86,18 @@ export default config
8686
| `disabled` | `boolean` | Disable the MCP plugin while keeping database schema consistent. |
8787
| `overrideApiKeyCollection` | `function` | A function that allows you to override the automatically generated API Keys collection. |
8888
| `mcp` | `object` | MCP options that allow you to customize the MCP server. |
89-
| `mcp.tools` | `array` | An array of custom tools to add to the MCP server. |
89+
| `mcp.tools` | `array` | An array of tools to add to the MCP server. |
9090
| `mcp.tools.name` | `string` | The name of the tool. |
9191
| `mcp.tools.description` | `string` | The description of the tool. |
9292
| `mcp.tools.handler` | `function` | The handler function for the tool. |
9393
| `mcp.tools.parameters` | `object` | The parameters for the tool (Zod schema). |
94-
| `mcp.prompts` | `array` | An array of custom prompts to add to the MCP server. |
94+
| `mcp.prompts` | `array` | An array of prompts to add to the MCP server. |
9595
| `mcp.prompts.name` | `string` | The name of the prompt. |
9696
| `mcp.prompts.title` | `string` | The title of the prompt (used by LLMs to determine when to use it). |
9797
| `mcp.prompts.description` | `string` | The description of the prompt. |
9898
| `mcp.prompts.handler` | `function` | The handler function for the prompt. |
9999
| `mcp.prompts.argsSchema` | `object` | The arguments schema for the prompt (Zod schema). |
100-
| `mcp.resources` | `array` | An array of custom resources to add to the MCP server. |
100+
| `mcp.resources` | `array` | An array of resources to add to the MCP server. |
101101
| `mcp.resources.name` | `string` | The name of the resource. |
102102
| `mcp.resources.title` | `string` | The title of the resource (used by LLMs to determine when to use it). |
103103
| `mcp.resources.description` | `string` | The description of the resource. |
@@ -120,14 +120,14 @@ The plugin automatically creates an **API Keys** collection that provides high-r
120120
- Create API keys for MCP clients
121121
- Allow or disallow specific MCP capabilities in real-time
122122
- Control which collections can be accessed via MCP
123-
- Enable or disable custom tools
123+
- Enable or disable tools
124124

125125
You can customize this collection using the `overrideApiKeyCollection` option:
126126

127127
```ts
128128
mcpPlugin({
129129
overrideApiKeyCollection: (collection) => {
130-
// Add custom fields to the API Keys collection
130+
// Add fields to the API Keys collection
131131
collection.fields.push({
132132
name: 'department',
133133
type: 'select',
@@ -142,7 +142,7 @@ mcpPlugin({
142142
})
143143
```
144144

145-
## Custom Prompts
145+
## Prompts
146146

147147
Prompts allow LLMs to generate structured messages for specific tasks. Each prompt defines a schema for arguments and returns formatted messages:
148148

@@ -171,7 +171,7 @@ prompts: [
171171
]
172172
```
173173

174-
## Custom Resources
174+
## Resources
175175

176176
Resources provide access to data or content that LLMs can read. They can be static or dynamic with parameterized URIs:
177177

@@ -259,15 +259,15 @@ collections: {
259259
}
260260
```
261261

262-
### Custom Tool with Database Access
262+
### Example Tool with Database Access
263263

264-
Custom tools allow you to extend MCP capabilities beyond basic CRUD operations. Use them when you need to perform complex queries, aggregations, or business logic that isn't covered by the standard collection operations.
264+
Tools allow you to extend MCP capabilities beyond basic CRUD operations. Use them when you need to perform complex queries, aggregations, or business logic that isn't covered by the standard collection operations.
265265

266266
```ts
267267
tools: [
268268
{
269-
name: 'getPostStats',
270-
description: 'Get statistics about posts in the system',
269+
name: 'getPostScores',
270+
description: 'Get useful scores about content in posts',
271271
handler: async (args, { payload }) => {
272272
const stats = await payload.find({
273273
collection: 'posts',
@@ -328,7 +328,7 @@ const config = buildConfig({
328328
collections: {
329329
posts: {
330330
enabled: true,
331-
description: 'My posts',
331+
description: 'Posts with content about science and nature',
332332
},
333333
},
334334
}),

0 commit comments

Comments
 (0)