Skip to main content

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 name field entirely
  • Using title instead of name (for tools/prompts - resources use uri instead)
  • Leaving the name field as an empty string
  • PKU123 - Missing Description
  • PKU220 - Missing URI (for MCP resources)
  • PKU236 - Missing Function