> ## Documentation Index
> Fetch the complete documentation index at: https://docs.skybridge.tech/llms.txt
> Use this file to discover all available pages before exploring further.

# Type Utilities

> Type your own code from your server's tools

[`generateHelpers`](https://docs.skybridge.tech/api-reference/generate-helpers) already types [`useCallTool`](https://docs.skybridge.tech/api-reference/use-call-tool) and [`useToolInfo`](https://docs.skybridge.tech/api-reference/use-tool-info) for you. These utilities go one level lower: they pull a [tool](https://docs.skybridge.tech/build/tools.md)'s input, output, or name types straight from your [server](https://docs.skybridge.tech/api-reference/mcp-server.md) type, so you can type your own components and helpers from the same source of truth.

## Example

Type a component's props from a tool's output, with no shape to redeclare:

```tsx theme={null}
import type { ToolOutput } from "skybridge/server";
import type { AppType } from "../server";

type Products = ToolOutput<AppType, "search-products">["products"];

function ProductGrid({ products }: { products: Products }) {
  return (
    <ul>
      {products.map((p) => (
        <li key={p.id}>{p.name}</li>
      ))}
    </ul>
  );
}
```

## Utilities

Each takes your app type (`AppType`, that is `typeof app`), and the tool-specific ones also take a tool name. All import from `skybridge/server`.

| Utility | Resolves to |
| - | - |
| `ToolInput<AppType, Name>` | The tool's input type. |
| `ToolOutput<AppType, Name>` | The tool's output (`structuredContent`) type. |
| `ToolResponseMetadata<AppType, Name>` | The tool's response `_meta` type. |
| `ToolNames<AppType>` | A union of the server's tool names. |
| `InferTools<AppType>` | The full tool registry, mostly used internally by `generateHelpers`. |

> [card] [generateHelpers](https://docs.skybridge.tech/api-reference/generate-helpers.md)
>
> Typed hooks, the common path

> [card] [useToolInfo](https://docs.skybridge.tech/api-reference/use-tool-info.md)
>
> Read the tool result in the view

> [card] [McpServer](https://docs.skybridge.tech/api-reference/mcp-server.md)
>
> The server you infer from


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.