# Metatextai

Metatext AI specializes in natural language processing and text generation, helping organizations automate writing tasks, sentiment analysis, or content moderation

- **Category:** artificial intelligence
- **Auth:** API_KEY
- **Composio Managed App Available?** N/A
- **Tools:** 13
- **Triggers:** 0
- **Slug:** `METATEXTAI`
- **Version:** 20260211_00

## Tools

### Chat Completions

**Slug:** `METATEXTAI_CHAT_COMPLETIONS`

Tool to generate chat completions. Use when you need OpenAI-compatible conversational responses.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `stop` | string | No | Optional stop sequence to end generation when encountered. |
| `model` | string | Yes | Model to use for chat completion. |
| `prompt` | string | No | Optional prompt text; alternative to using 'messages'. |
| `project` | string | No | Optional project identifier for billing or project-specific settings. |
| `messages` | array | No | List of message objects for conversation; alternative to 'prompt'. |
| `max_tokens` | integer | No | Maximum number of tokens to generate. |
| `temperature` | number | No | Sampling temperature to use, between 0.0 and 2.0. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Classify Text

**Slug:** `METATEXTAI_CLASSIFY`

Tool to classify text. Use when you need to obtain labels and confidence scores from a trained MetatextAI model for given text.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `text` | string | Yes | Text to classify. |
| `model` | string | No | Model identifier to use. Defaults to the project's primary model if omitted. |
| `options` | object | No | Optional settings to refine classification behavior. |
| `project_id` | string | Yes | Identifier of the project to use for classification. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Create Policy Guardrails

**Slug:** `METATEXTAI_CREATE_POLICY_GUARDRAILS`

Tool to create a policy guardrail. Use when you need to define automated guardrails for content in a specific application.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | Unique identifier for the new policy |
| `rules` | array | Yes | List of policy rules to enforce |
| `target` | string | Yes | Where the policy applies. Allowed values: 'user', 'assistant', 'context', 'system'. Aliases: 'output'=assistant, 'input'=['user','context'] |
| `definition` | string | No | Optional short description of the policy |
| `application_id` | string | Yes | Identifier of the application in which to create the policy |
| `override_response` | string | No | Optional custom message returned when a policy violation occurs |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Delete Guardrail Policy

**Slug:** `METATEXTAI_DELETE_POLICY_GUARDRAILS`

Tool to delete a guardrail policy. Use when you need to remove a policy by ID for a specific application after confirming valid application and policy IDs.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `policy_id` | string | Yes | The ID of the policy to delete. |
| `application_id` | string | Yes | The ID of the application. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Evaluate Messages

**Slug:** `METATEXTAI_EVALUATE`

Tool to evaluate LLM messages against policies/guardrails. Use after generating model output to get violation details or corrections.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `messages` | array | Yes | Conversation messages to evaluate. Must include 'user' and 'assistant' messages; 'system' optional. |
| `policies` | array | No | Inline policies to evaluate; overrides console defaults when provided. |
| `fail_fast` | boolean | No | If true, stops evaluation on first violation. |
| `policy_ids` | array | No | List of policy IDs to override default console policies. |
| `application` | string | No | Application identifier; defaults to your configured application ID. |
| `override_response` | string | No | Top-level override response message on violation. Overrides correction. |
| `correction_enabled` | boolean | No | If true, returns corrected output when violations occur (unless override_response is set). |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Run Extraction

**Slug:** `METATEXTAI_EXTRACT`

Tool to run information extraction. Use when you need to extract structured data from text.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `text` | string | Yes | Text to perform information extraction on |
| `model` | string | No | Optional model identifier to use for extraction |
| `options` | object | No | Additional options for extraction |
| `project_id` | string | Yes | Identifier of the project to run extraction on |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Generate Text

**Slug:** `METATEXTAI_GENERATE`

Tool to generate text for a project model. Use when you need LLM completions or chat responses. Supports both prompt and message-based inputs with temperature, stop-sequence, and token limits.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `stop` | string | No | Sequence at which to stop generating further tokens. |
| `model` | string | Yes | Model to use for generation (e.g., 'gpt-3.5'). |
| `prompt` | string | No | Prompt text for completion. Provide this OR `messages`, not both. |
| `messages` | array | No | List of chat messages for chat-based models. Provide this OR `prompt`, not both. |
| `max_tokens` | integer | No | Maximum number of tokens to generate. |
| `project_id` | string | Yes | Identifier of the project to use for generation. |
| `temperature` | number | No | Sampling temperature between 0 and 2. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List Applications

**Slug:** `METATEXTAI_LIST_APPLICATIONS`

Tool to retrieve a list of all existing applications. Use when you need to view application IDs, names, and descriptions.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `tag` | string | No | Filter by tag or label (if supported) |
| `limit` | integer | No | Maximum number of applications to return (if supported) |
| `offset` | integer | No | Number of items to skip (if supported) |
| `search` | string | No | Filter applications by name/description (if supported) |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List Models

**Slug:** `METATEXTAI_LIST_MODELS`

Tool to retrieve a list of all available models and their supported tasks. Use when you need to choose an appropriate model for chat completions.

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List Guardrail Policies

**Slug:** `METATEXTAI_LIST_POLICIES_GUARDRAILS`

Tool to list all guardrail policies for a specific application. Use after obtaining an application ID to inspect its configured policies.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `application_id` | string | Yes | Identifier of the application to list policies for |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List Red Team Test Probes

**Slug:** `METATEXTAI_LIST_RED_TEAM_TEST_PROBES`

Tool to list all available red team test probes. Use when you need to discover available probes for red teaming.

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Run Red Team Test Scan

**Slug:** `METATEXTAI_RUN_RED_TEAM_TEST_SCAN`

Tool to run a vulnerability red-team test scan. Use when you need to execute probes against an application.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `probes` | array | No | List of probe identifiers to run. If not provided, default probes will be used. |
| `application` | string | Yes | The application ID to scan. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Update Policy Guardrails

**Slug:** `METATEXTAI_UPDATE_POLICY_GUARDRAILS`

Tool to update an existing policy's guardrails. Use when you need to modify a policy's rules after confirming it exists.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | Unique policy ID. Must be identical to the path `policy_id`. |
| `rules` | array | Yes | List of rule objects that define the guardrails. |
| `target` | string | Yes | Where rules apply. Allowed values: 'user', 'assistant', 'context', 'system'. Alias 'input' maps to ['user','context'], 'output' maps to 'assistant'. |
| `policy_id` | string | Yes | The policy ID to update. Must match `id` in the body. |
| `definition` | string | No | Short description of the policy (optional). |
| `application_id` | string | Yes | The application ID that scopes the policy. |
| `override_response` | string | No | Custom message returned when violations occur (optional). |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |
