Create a log export definition with filters and requested fields. This only sets up the export and does not start processing; call start_log_export next, then use get_log_export or download_log_export to inspect or retrieve the finished result.
AI agents use create_log_export to create or update resources in Portkey Admin — usually the action step of a workflow, after the agent has gathered context. Every call changes real data in your Portkey Admin environment.
| Parameter | Type | Required | Description |
|---|---|---|---|
ai_model | array | — | Filter by specific AI model names |
cost_max | number | — | Maximum cost filter |
cost_min | number | — | Minimum cost filter |
time_max | string | Yes | Maximum time filter in date format (e.g., '2024-01-31' or ISO 8601) |
time_min | string | Yes | Minimum time filter in date format (e.g., '2024-01-01' or ISO 8601) |
description | string | — | Human-readable description for the export job |
workspace_id | string | — | Workspace ID for the export |
total_units_max | number | — | Maximum total units (tokens) filter |
total_units_min | number | — | Minimum total units (tokens) filter |
requested_fields | array | Yes | Fields to include in export: id, trace_id, created_at, request, response, is_success, ai_org, ai_model, req_units, res_units, total_units, request_url, cost, co |
Parameters from the server's own tool schema.
An AI agent can call create_log_export faster than any human can review — one bad instruction and it creates or modifies resources in Portkey Admin by the hundred, each call as confident as the last.
Risk signalsHigh parameter count (10 properties)
Attacks that exploit this kind of access
Create a log export definition with filters and requested fields. This only sets up the export and does not start processing; call start_log_export next, then use get_log_export or download_log_export to inspect or retrieve the finished result. It is categorised as a Write tool in the Portkey Admin MCP Server, which means it can create or modify data. Consider rate limits to prevent runaway writes.
create_log_export accepts 10 parameters: ai_model, cost_max, cost_min, time_max, time_min, description, workspace_id, total_units_max, total_units_min, requested_fields. Required: time_max, time_min, requested_fields. The full parameter table on this page comes from the server's own tool schema.
Register the Portkey Admin MCP server in PolicyLayer and add a rule for create_log_export: allow, deny, rate-limit, or require approval. Point your MCP client at the PolicyLayer proxy URL and the rule is enforced on every call, before it reaches Portkey Admin. Nothing to install.
create_log_export is a Write tool with medium risk. Write tools should be rate-limited to prevent accidental bulk modifications.
Yes. Add a rate_limit block to the create_log_export rule in your PolicyLayer policy. For example, setting max: 10 and window: 60 limits the tool to 10 calls per minute. Rate limits are tracked per agent session and reset automatically.
Set action: deny in the PolicyLayer policy for create_log_export. The AI agent will receive a policy violation error and cannot call the tool. You can also include a reason field to explain why the tool is blocked.
create_log_export is provided by the Portkey Admin MCP server (CodesWhat/portkey-admin-mcp). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.