PKU370: Missing Title Property
Error Message
[PKU370] MCP resource '[uri]' is missing the required 'title' property.
What Went Wrong
Your MCP resource is missing the required title property. Unlike tools and prompts which use name, resources require both a uri for identification and a title for display.
How to Fix
Add a title property to your MCP resource:
import { addMCPResource } from '@pikku/core/mcp'
import { pikkuFunc } from '#pikku'
addMCPResource({
uri: 'file:///config/database',
title: 'Database Configuration', // ✅ Add this
description: 'Current database connection settings',
func: pikkuFunc(async () => {
return {
content: JSON.stringify({ host: 'localhost', port: 5432 }),
}
}),
})
Title vs Name vs URI
MCP endpoints use different identification properties:
| Type | Identifier | Display Name |
|---|---|---|
| Tool | name | name |
| Prompt | name | name |
| Resource | uri | title |
Resources are unique because they:
- Use
urifor technical identification - Use
titlefor human-readable display - Require both properties
Best Practices
- Use clear, descriptive titles
- Keep titles concise but informative
- Use title case (e.g., "User Profile Settings")
- Avoid redundancy between title and description