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

# Tools (Alpha)

> Enabling LLMs to take action in your business processes

<Note>
  Tools are currently in private alpha and subject to change. If you would like to use them, please reach out to [re-factor Support](mailto:support@psci-labs.com).
</Note>

## Background

Tools are a fundamental building block in re-factor that enable LLMs to interact with external systems and perform real-world actions. Tools enable LLMs to go beyond generating text and perform real work on your behalf.

### Tool Examples

A tool is an interface that defines how an LLM can interact with an external system or resource. Tools can, subject to your permissions, provide a means for your LLM to:

* Query databases or APIs
* Read from or write to files
* Use a browser or sandboxed computer
* Execute code or scripts

## Tool Registry

The Tool Registry is a central repository where all tools you want to expose to your LLMs can be registered and managed. Each tool in the registry includes:

* Name and description
* Input/output schema
* Authentication requirements
* Usage permissions
* Performance metrics

## Tool Designer

The Tool Designer provides a visual interface for creating and modifying tools. Key features include:

* Visual schema builder
* Authentication configuration
* Permission management
* Testing interface
* Version control

## Using Tools

Tools can be used in several ways within re-factor:

1. **Direct Invocation**: Call tools directly from your code using our SDK
2. **Flow Integration**: Include tools as steps in automated workflows
3. **Agent Access**: Give agents access to tool sets for autonomous operation

### Best Practices

When working with tools:

* Define clear input/output schemas
* Include descriptive documentation
* Implement proper error handling
* Monitor performance and usage
* Regularly test and validate
* Control access permissions

## Examples

Here are some common tool patterns:

```typescript theme={null}
// Example tool definition
const databaseTool = {
  name: 'query_database',
  description: 'Query the application database',
  parameters: {
    query: 'string',
    limit: 'number'
  },
  returns: 'array'
};

// Example tool usage in a prompt
const prompt = `
You have access to a database query tool. 
To use it, call query_database with a SQL query and limit.
`;
```

## Next Steps

* Explore the [Tool Registry](/api-reference/tools) to see available tools
* Learn how to [create custom tools](/sdk/ts/quickstart#creating-tools)
* See how tools work with [Flows](/core-concepts/flows) and [Agents](/core-concepts/agents)
