AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified MIT Self-run

Tool Renderer Contract

skill-hsienw-ai-agent-engineering-playbook-tool-renderer-contract · by HsienW

Design and review structured tool-result rendering. Use when rendering tool calls, tool messages, structured tool outputs, status cards, fallback JSON/text displays, parser boundaries, display status mappings, or unknown tool results.

No reviews yet
0 installs
0 views
view→install

Install

$ agentstack add skill-hsienw-ai-agent-engineering-playbook-tool-renderer-contract

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-hsienw-ai-agent-engineering-playbook-tool-renderer-contract)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
16d ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Tool Renderer Contract? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

Tool Renderer Contract

Skill Interface

  • Name: tool-renderer-contract.
  • Description: Design and review structured tool-result rendering for tool calls, tool messages, structured tool outputs, status cards, fallback JSON or text displays, parser boundaries, display status mappings, and unknown tool results.
  • Parameters: Tool result schema, raw message content, parser boundary, display status mapping, known specialized renderers, fallback rendering behavior, sensitive field policy, and verification cases.
  • Instructions: Use this skill when rendering tool output in UI. Parse raw output as untrusted data, validate minimum structured fields, map status through a closed display union, provide safe fallbacks for unknown tools, and verify malformed, future-version, and sensitive-data cases.

Tool rendering should be schema-driven and resilient to unknown tools. The UI must not trust raw tool output as display-ready data.

Layers

  1. Message container: owns message grouping and association between tool call

metadata and tool output.

  1. Generic tool renderer: parses common metadata, displays status, and chooses a

specialized renderer when one is available.

  1. Specialized renderer: renders a known tool result schema.
  2. Fallback renderer: safely displays unknown JSON, text, or parse failures.

Structured Result Shape

Use a generic shape that can be specialized:

type ToolResult = {
  schemaVersion: string;
  tool: string;
  status: TStatus;
  data?: TData;
  summary?: string;
  errorCode?: string;
};

The frontend parser should accept unknown or raw message content, validate the minimum fields, and return a typed result or undefined.

Status Mapping

Map tool status through a closed display status union:

type ToolDisplayStatus =
  | 'running'
  | 'success'
  | 'needs_input'
  | 'not_found'
  | 'denied'
  | 'error'
  | 'timeout'
  | 'cancelled'
  | 'unknown';

Use a single Record for labels, icons, colors, and ARIA text. Do not scatter status rendering across component branches.

Safety Rules

  • Treat tool output as untrusted.
  • Never render raw HTML from tool output unless sanitized by a trusted policy.
  • Never expose stack traces, credentials, provider secrets, or raw internal

payloads.

  • Do not infer status from user-visible text.
  • Do not hardcode one tool result as the only rendering path.
  • Unknown tools must have a safe fallback.

Parser Rules

  • Validate schemaVersion, tool, and status.
  • Preserve unknown fields for diagnostics only when safe.
  • Be forward compatible with unknown minor schema versions.
  • Provide unknown-status fallback.
  • Keep type assertions behind runtime checks.

Verification

Test known structured results, unknown tool results, malformed JSON, plain text output, unknown status, future schema versions, error envelope rendering, and sensitive field redaction.

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.