DF0014: Invalid Agent Field
Package:
devframe
Experimental
The agent-native surface is experimental and may change without a major version bump until it stabilizes.
Message
RPC function "
{name}" has an invalidagentfield —descriptionmust be a non-empty string.
Cause
An RPC function was defined with an agent field (opting it in for exposure to agents via the MCP adapter), but the required description property is missing or empty.
Agents rely on the description to decide when to invoke a tool. Empty or placeholder descriptions would produce unusable agent surface.
Example
defineRpcFunction({
name: 'rolldown-get-session-summary',
type: 'query',
agent: {
description: '', // ❌ empty
},
// ...
})Fix
Provide a non-empty description (~1–3 sentences) explaining what the tool does and when agents should invoke it:
defineRpcFunction({
name: 'rolldown-get-session-summary',
type: 'query',
agent: {
description: 'Summarize a Rolldown build session by its id. Safe to call freely.',
},
// ...
})If you didn't intend for this function to be agent-exposed, remove the agent field entirely (default-deny).
Source
packages/devframe/src/node/host-agent.ts