# Function toolSuccessStructured

MCP exports - MCP server implementation Split from index.ts for file size compliance (Issue #285) Updated Issue #538: Added missing tool registration exports

- toolSuccessStructured(data: Record<string, unknown>): ToolResult

  Creates a successful tool result with structured content for outputSchema validation.

  When a tool is registered with outputSchema, the SDK validates structuredContent against the schema. This helper returns both text (for display) and structured data.

  #### Parameters

  - data: Record<string, unknown>

    The structured result data (must match the tool's outputSchema)

  #### Returns ToolResult

  A ToolResult with both text content and structuredContent

  #### Example

      return toolSuccessStructured({ experts: [...], count: 10 });

  - Defined in packages/nexus-agents/src/mcp/tools/tool-result.ts:106