--- title: 'DF0014: Invalid Agent Field' description: 'RPC function "{name}" has an invalid agent field: description must be a non-empty string.' --- ## Message > RPC function "`{name}`" has an invalid `agent` field: `description` must be a non-empty string. ## Cause An RPC function opts into agent exposure with an `agent` field, but its required `description` is missing or empty. Agents rely on the description to decide when to invoke a tool. ## Example ```ts 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, or remove the `agent` field to keep it RPC-only. ```ts defineRpcFunction({ name: 'rolldown-get-session-summary', type: 'query', agent: { description: 'Summarize a Rolldown build session by its id. Safe to call freely.', }, // ... }) ``` ## Source - [`packages/devframe/src/node/host-agent.ts`](https://github.com/devframes/devframe/blob/main/packages/devframe/src/node/host-agent.ts): agent registration throws `DF0014` when a tool's `agent.description` is missing or empty.