---
title: "Message parts"
description: "A native message-part is an inline tool surface mounted below the relevant chat message. It uses the same ToolResultSurfaceProps, states, producer-lane context, toolNames, and o…"
url: "https://sotaagents.ai/manual/developer-guide/message-parts"
generated_by: "sotaagents-ldp"
docs_index: "https://sotaagents.ai/manual/llms.txt"
locale: "en"
---

# Message parts

A native `message-part` is an inline tool surface mounted below the relevant chat message. It uses the same `ToolResultSurfaceProps`, states, producer-lane context, `toolNames`, and optional `renderBeforeOutput` contract as a tool view; choose it when the result should read as message content.

YAML

```
contributes:
  ui:
    - id: source-summary
      kind: nativeModule
      surface: message-part
      slot: chat.message.inline.below
      toolNames: [searchSources]
      renderBeforeOutput: true
      module:
        entry: dist/ui/app.js
        export: SourceSummary
```

TSX

```
import type { ToolResultSurfaceProps } from '@sota/platform';

type SearchOutput = { sources: Array<{ title: string; url: string }> };

export function SourceSummary({ toolResult }: ToolResultSurfaceProps<unknown, SearchOutput>) {
  if (toolResult.state === 'output-pending') {
    return <aside aria-live="polite">Waiting for the app…</aside>;
  }
  if (toolResult.state !== 'output-available') return null;
  return (
    <aside aria-label="Sources">
      {toolResult.result?.sources.map((source) => (
        <a key={source.url} href={source.url} rel="noreferrer" target="_blank">
          {source.title}
        </a>
      ))}
    </aside>
  );
}
```

> [!NOTE]
> This is not a declarative message renderer.
>
> `kind: messageRenderer` decorates matched message text as a citation, mention, or pill. `surface: message-part` loads app React for named tool calls.
