PKU111: Missing Name Property
Error Message
[PKU111] MCP [tool|resource|prompt] is missing the required 'name' property.
What Went Wrong
You're trying to register an MCP tool, resource, or prompt without providing a required name property. Every MCP endpoint needs a unique name to identify it.
How to Fix
Add a name property to your MCP registration:
MCP Tool Example
import { addMCPTool } from '@pikku/core/mcp'
import { pikkuFunc } from '#pikku'
addMCPTool({
name: 'myTool', // ✅ Add this
description: 'My tool description',
func: pikkuFunc(async () => {
// your logic
}),
})
MCP Prompt Example
import { addMCPPrompt } from '@pikku/core/mcp'
import { pikkuFunc } from '#pikku'
addMCPPrompt({
name: 'myPrompt', // ✅ Add this
description: 'My prompt description',
func: pikkuFunc(async () => {
// your logic
}),
})
Common Mistakes
- Forgetting to add the
namefield entirely - Using
titleinstead ofname(for tools/prompts - resources useuriinstead) - Leaving the
namefield as an empty string