Skip to main content
Glama

insert_log

Log AI request and response data into Portkey for tracking and monitoring purposes, including endpoints, providers, headers, bodies, and performance metrics.

Instructions

Insert a log entry (or multiple entries) into Portkey for tracking AI requests and responses

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
request_urlNoThe endpoint URL being called
request_providerNoAI provider name (e.g., 'openai', 'anthropic')
request_methodNoHTTP method used (defaults to 'post')post
request_headersNoRequest headers as key-value pairs
request_bodyNoRequest payload/body
response_statusNoHTTP response status code (defaults to 200)
response_headersNoResponse headers as key-value pairs
response_bodyNoResponse payload/body
response_timeNoResponse latency in milliseconds
streaming_modeNoWhether the response was streamed
metadata_organizationNoOrganization identifier for the log
metadata_userNoUser identifier for the log
metadata_trace_idNoTrace ID for distributed tracing
metadata_span_idNoSpan ID for tracing
metadata_span_nameNoSpan name for tracing
metadata_parent_span_idNoParent span ID for tracing
metadata_customNoAdditional custom metadata key-value pairs
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries full burden but provides minimal behavioral context. It mentions inserting 'a log entry (or multiple entries)' but doesn't clarify if this is a write operation, what permissions are needed, how errors are handled, or any rate limits. For a tool with 17 parameters and no annotations, this is inadequate.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads the core purpose without unnecessary words. Every part earns its place by specifying the action, resource, and context.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (17 parameters, no output schema, no annotations), the description is insufficient. It lacks details on behavioral traits, error handling, return values, or usage context, leaving significant gaps for an AI agent to understand how to invoke it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so parameters are fully documented in the schema. The description adds no additional parameter semantics beyond implying the tool handles AI request/response tracking, which aligns with schema fields like 'request_provider' and 'response_time'. Baseline 3 is appropriate as the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('insert') and resource ('log entry into Portkey'), specifying it's for tracking AI requests and responses. It distinguishes from siblings like 'create_log_export' or 'get_trace' by focusing on insertion rather than creation/retrieval, though it doesn't explicitly contrast with all 100+ siblings.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives like 'create_log_export' or 'get_trace', nor any prerequisites or exclusions. The description only states what it does, not when it's appropriate.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/s-b-e-n-s-o-n/portkey-admin-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server