Metatextai connects to a Nagent workspace with an API key. Once it is connected, agents can call 13 Metatextai actions, such as "Create Policy Guardrails", "List Applications" and "List Models". Nothing is enabled on connect: each action is allowed one at a time, and an action with side effects runs or waits for a person according to the agent's level.
Every operation an agent can call against Metatextai, with input parameters and output schema.
METATEXTAI_CHAT_COMPLETIONSTool to generate chat completions. Use when you need OpenAI-compatible conversational responses.
Input parameters
Optional stop sequence to end generation when encountered.
Model to use for chat completion.
Optional prompt text; alternative to using 'messages'.
Optional project identifier for billing or project-specific settings.
List of message objects for conversation; alternative to 'prompt'.
Maximum number of tokens to generate.
Sampling temperature to use, between 0.0 and 2.0.
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
METATEXTAI_CLASSIFYTool to classify text. Use when you need to obtain labels and confidence scores from a trained MetatextAI model for given text.
Input parameters
Text to classify.
Model identifier to use. Defaults to the project's primary model if omitted.
Optional settings to refine classification behavior.
Identifier of the project to use for classification.
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
METATEXTAI_CREATE_POLICY_GUARDRAILSTool to create a policy guardrail. Use when you need to define automated guardrails for content in a specific application.
Input parameters
Unique identifier for the new policy
List of policy rules to enforce
Where the policy applies. Allowed values: 'user', 'assistant', 'context', 'system'. Aliases: 'output'=assistant, 'input'=\['user','context'\]
Optional short description of the policy
Identifier of the application in which to create the policy
Optional custom message returned when a policy violation occurs
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
METATEXTAI_DELETE_POLICY_GUARDRAILSTool 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
The ID of the policy to delete.
The ID of the application.
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
METATEXTAI_EVALUATETool to evaluate LLM messages against policies/guardrails. Use after generating model output to get violation details or corrections.
Input parameters
Conversation messages to evaluate. Must include 'user' and 'assistant' messages; 'system' optional.
Inline policies to evaluate; overrides console defaults when provided.
If true, stops evaluation on first violation.
List of policy IDs to override default console policies.
Application identifier; defaults to your configured application ID.
Top-level override response message on violation. Overrides correction.
If true, returns corrected output when violations occur (unless override_response is set).
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
METATEXTAI_EXTRACTTool to run information extraction. Use when you need to extract structured data from text.
Input parameters
Text to perform information extraction on
Optional model identifier to use for extraction
Additional options for extraction
Identifier of the project to run extraction on
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
METATEXTAI_GENERATETool 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
Sequence at which to stop generating further tokens.
Model to use for generation (e.g., 'gpt-3.5').
Prompt text for completion. Provide this OR `messages`, not both.
List of chat messages for chat-based models. Provide this OR `prompt`, not both.
Maximum number of tokens to generate.
Identifier of the project to use for generation.
Sampling temperature between 0 and 2.
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
METATEXTAI_LIST_APPLICATIONSTool to retrieve a list of all existing applications. Use when you need to view application IDs, names, and descriptions.
Input parameters
Filter by tag or label (if supported)
Maximum number of applications to return (if supported)
Number of items to skip (if supported)
Filter applications by name/description (if supported)
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
METATEXTAI_LIST_MODELSTool 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
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
METATEXTAI_LIST_POLICIES_GUARDRAILSTool to list all guardrail policies for a specific application. Use after obtaining an application ID to inspect its configured policies.
Input parameters
Identifier of the application to list policies for
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
METATEXTAI_LIST_RED_TEAM_TEST_PROBESTool to list all available red team test probes. Use when you need to discover available probes for red teaming.
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
METATEXTAI_RUN_RED_TEAM_TEST_SCANTool to run a vulnerability red-team test scan. Use when you need to execute probes against an application.
Input parameters
List of probe identifiers to run. If not provided, default probes will be used.
The application ID to scan.
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
METATEXTAI_UPDATE_POLICY_GUARDRAILSTool to update an existing policy's guardrails. Use when you need to modify a policy's rules after confirming it exists.
Input parameters
Unique policy ID. Must be identical to the path `policy_id`.
List of rule objects that define the guardrails.
Where rules apply. Allowed values: 'user', 'assistant', 'context', 'system'. Alias 'input' maps to \['user','context'\], 'output' maps to 'assistant'.
The policy ID to update. Must match `id` in the body.
Short description of the policy (optional).
The application ID that scopes the policy.
Custom message returned when violations occur (optional).
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
Agents can call 13 Metatextai actions on Nagent, including "Create Policy Guardrails", "List Applications" and "List Models". Create Policy Guardrails: Create a policy guardrail. Each action is listed on this page with its input parameters and its output.
Metatextai connects with an API key, under your workspace's own connection. Nothing is enabled on connect: each action is allowed one at a time and can be scoped to the agents that need it.
Create Policy Guardrails takes 4 required inputs: id, rules, target and application_id. It also takes 2 optional inputs: definition and override_response. It returns data, error and successful.