> ## Documentation Index
> Fetch the complete documentation index at: https://cognitio-agent.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Variable: PermissionDecision

> Generated from the public TypeScript API.

```ts theme={null}
PermissionDecision: object;
```

Construct portable permission decisions for canUseTool and supported hooks.

## Type Declaration

### allow()

```ts theme={null}
allow(updatedInput?): PermissionDecision;
```

Approve the request, optionally replacing its input.

#### Parameters

##### updatedInput?

`Record`\<`string`, `unknown`>

Validated replacement tool arguments.

#### Returns

[`PermissionDecision`](https://cognitio-agent.mintlify.site/api-reference/supporting/PermissionDecision)

An allow decision.

#### Example

```ts theme={null}
return PermissionDecision.allow()
```

### ask()

```ts theme={null}
ask(): PermissionDecision;
```

Delegate to the remaining permission path; this is not approval.

#### Returns

[`PermissionDecision`](https://cognitio-agent.mintlify.site/api-reference/supporting/PermissionDecision)

An ask decision.

#### Example

```ts theme={null}
return PermissionDecision.ask()
```

### deny()

```ts theme={null}
deny(message?): PermissionDecision;
```

Reject a request with an optional explanation.

#### Parameters

##### message?

`string`

Reason shown to the runtime/model.

#### Returns

[`PermissionDecision`](https://cognitio-agent.mintlify.site/api-reference/supporting/PermissionDecision)

A deny decision.

#### Example

```ts theme={null}
return PermissionDecision.deny("Read-only agent")
```


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