# InferToolResultMetadata

<!-- DO NOT EDIT: this page is autogenerated from the type comments -->

```ts
type InferToolResultMetadata<T> = ResultMetadataFromSchema<T extends object ? TSchema : undefined>;
```

Defined in: [packages/ai/src/activities/chat/tools/tool-definition.ts:229](https://github.com/TanStack/ai/blob/main/packages/ai/src/activities/chat/tools/tool-definition.ts#L229)

Extract the result metadata type from a tool. A Standard Schema in
`resultMetadataSchema` gives its type. No schema, or a plain JSON Schema,
gives `Record<string, unknown>`.

## Type Parameters

### T

`T`
