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

# Set Yaml Approved Tools • AI Agent SDK

> set_yaml_approved_tools: Set the list of YAML-approved tools for the current context.

# set\_yaml\_approved\_tools

<div className="flex items-center gap-2">
  <Badge color="teal">Function</Badge>
</div>

> This function is defined in the [**approval**](../modules/approval) module.

Set the list of YAML-approved tools for the current context.

This is called by the workflow runner when parsing agents.yaml with approve field.

```mermaid theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
%%{init: {'theme': 'base', 'themeVariables': { 'primaryColor': '#8B0000', 'primaryTextColor': '#fff', 'primaryBorderColor': '#710101', 'lineColor': '#189AB4', 'secondaryColor': '#189AB4', 'tertiaryColor': '#fff' }}}%%

graph LR
    agent["Agent"] -- "uses" --> tool["Tool: set_yaml_approved_tools"]
    tool -- "returns" --> result["Result"]
    style tool fill:#189AB4,color:#fff
    style agent fill:#8B0000,color:#fff
    style result fill:#8B0000,color:#fff
```

## Signature

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
def set_yaml_approved_tools(tools: List[str]) -> contextvars.Token
```

## Parameters

<ParamField query="tools" type="List" required={true}>
  List of tool names to auto-approve
</ParamField>

### Returns

<ResponseField name="Returns" type="contextvars.Token">
  Token that can be used to reset the context
</ResponseField>

## Source

<Card title="View on GitHub" icon="github" href="https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-agents/praisonaiagents/approval.py#L279">
  `praisonaiagents/approval.py` at line 279
</Card>

***

## Related Documentation

<CardGroup cols={2}>
  <Card title="Tools Concept" icon="wrench" href="/docs/concepts/tools" />

  <Card title="Create Custom Tools" icon="plus" href="/docs/guides/tools/create-custom-tools" />

  <Card title="Tool Development" icon="code" href="/docs/tutorials/advanced-tool-development" />
</CardGroup>
