coaiapy-mcp

v0.4.3
coaiapy-mcp Checked 1 day ago Published 6 months ago

MCP (Model Context Protocol) wrapper for coaiapy observability toolkit

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

coaia_tash

Stash key-value pair to Redis

ParameterTypeDescription
key *stringRedis key
value *stringValue to store

coaia_fetch

Fetch value from Redis

ParameterTypeDescription
key *stringRedis key to fetch

coaia_fuse_trace_create

Create Langfuse trace for observability. IMPORTANT: Use 'input_data' for context/inputs and 'output_data' for results/outputs. Use 'metadata' only for additional tags/labels.

ParameterTypeDescription
trace_id *stringUnique trace identifier
input_dataPREFERRED: The input/context data for this trace (e.g., user query, request parameters). Use this instead of metadata for actual data.
metadataobjectAdditional metadata for tags/labels only (e.g., environment, version). Prefer using input_data and output_data for actual content.
namestringTrace name
output_dataPREFERRED: The output/result data for this trace (e.g., response, generated content). Use this instead of metadata for actual data.
session_idstringSession identifier
user_idstringUser identifier

coaia_fuse_add_observation

Add observation to Langfuse trace. IMPORTANT: Use 'input_data' for inputs/context and 'output_data' for results. Use 'metadata' only for tags/labels.

ParameterTypeDescription
name *stringObservation name
observation_id *stringUnique observation identifier
trace_id *stringParent trace identifier
end_timestringOptional end timestamp (ISO 8601)
input_dataPREFERRED: The input/context for this observation (e.g., function parameters, prompt). Use this instead of metadata for actual data.
metadataobjectAdditional metadata for tags/labels only (e.g., model name, temperature). Prefer using input_data and output_data for actual content.
observation_typestringType: SPAN, EVENT, or GENERATION
output_dataPREFERRED: The output/result of this observation (e.g., function return, LLM response). Use this instead of metadata for actual data.
parent_idstringParent observation ID for nesting
start_timestringOptional start timestamp (ISO 8601)

coaia_fuse_trace_patch_output

Update the output field of an existing trace. Use this to patch/modify trace results after creation.

ParameterTypeDescription
output_data *New output data (string, object, or array - any JSON-serializable data)
trace_id *stringTrace identifier to update

coaia_fuse_trace_get

Get a specific trace by ID from Langfuse with all its observations. Returns trace data with optional formatted tree view.

ParameterTypeDescription
trace_id *stringTrace identifier to retrieve
json_outputbooleanReturn raw JSON data instead of formatted tree

coaia_fuse_trace_view

View Langfuse trace details with observations (alias for coaia_fuse_trace_get). Returns trace data with optional formatted tree view.

ParameterTypeDescription
trace_id *stringTrace identifier to view
json_outputbooleanReturn raw JSON data instead of formatted tree

coaia_fuse_observation_get

Get a specific observation by ID from Langfuse. Returns observation data with optional formatted display.

ParameterTypeDescription
observation_id *stringObservation identifier to retrieve
json_outputbooleanReturn raw JSON data instead of formatted display

coaia_fuse_traces_list

List Langfuse traces with comprehensive filtering options. Supports filtering by session, user, name, tags, timestamps, and more.

ParameterTypeDescription
environmentarrayFilter by environment values
from_timestampstringInclude traces from this timestamp (ISO 8601 format, e.g., '2024-12-31T00:00:00Z')
json_outputbooleanReturn raw JSON data instead of formatted table
limitintegerItems per page (default 50)
namestringFilter by trace name (exact match)
order_bystringSort order, format: field.direction (e.g., 'timestamp.asc', 'timestamp.desc'). Fields: id, timestamp, name, userId, release, version, sessionId
pageintegerPage number (starts at 1)
releasestringFilter by release
session_idstringFilter by session ID
tagsarrayFilter by tags - only traces with ALL tags will be returned
to_timestampstringInclude traces before this timestamp (ISO 8601 format)
user_idstringFilter by user ID
versionstringFilter by version

coaia_fuse_traces_session_view

View all traces for a specific Langfuse session. Returns formatted table by default or raw JSON if json_output=true

ParameterTypeDescription
session_id *stringSession identifier to filter traces
json_outputbooleanReturn raw JSON data instead of formatted table

coaia_fuse_prompts_list

List all Langfuse prompts

coaia_fuse_prompts_get

Get specific Langfuse prompt by name. Supports retrieving a specific version number or label. If neither version nor label is provided, defaults to the 'production' label.

ParameterTypeDescription
name *stringPrompt name
labelstringPrompt label (e.g. 'production', 'staging', 'latest')
versionintegerSpecific version number to retrieve (takes precedence over label)

coaia_fuse_prompts_create

Create a new prompt version in Langfuse. Creates a new version each time for the same name.

ParameterTypeDescription
content *stringPrompt content (text string or JSON for chat prompts)
name *stringPrompt name
commit_messagestringVersion commit message for tracking
labelsarrayDeployment labels (e.g. ['production', 'staging'])
prompt_typestringPrompt type (default: text)
tagsarrayTags for categorization

coaia_fuse_prompt_version_labels_update

Update labels for a specific prompt version. Labels are unique across versions. The 'latest' label is reserved by Langfuse.

ParameterTypeDescription
labels *arrayNew labels to assign to this version
name *stringPrompt name
version *integerVersion number to update

coaia_fuse_prompts_delete

Delete a prompt from Langfuse. Can delete all versions or a specific version/label.

ParameterTypeDescription
name *stringPrompt name to delete
labelstringSpecific label to delete
versionintegerSpecific version to delete

coaia_fuse_datasets_list

List all Langfuse datasets

coaia_fuse_datasets_get

Get specific Langfuse dataset

ParameterTypeDescription
name *stringDataset name

coaia_fuse_score_configs_list

List all Langfuse score configurations

coaia_fuse_score_configs_get

Get specific Langfuse score configuration

ParameterTypeDescription
name_or_id *stringScore config name or ID

coaia_fuse_score_apply

Apply a score configuration to a trace or observation with validation

ParameterTypeDescription
config_name_or_id *stringName or ID of the score configuration
target_id *stringID of the trace or session
target_type *stringType of target (trace or session)
value *Score value (validated against config: number for NUMERIC, string/number for CATEGORICAL, boolean for BOOLEAN)
commentstringOptional comment to attach to the score
observation_idstringOptional observation ID (only for trace targets)

coaia_fuse_score_get

Get a specific score by ID from Langfuse.

ParameterTypeDescription
score_id *stringScore ID to retrieve

coaia_fuse_score_config_update

Update a score config (description, archive status) in Langfuse.

ParameterTypeDescription
config_id *stringScore config ID
descriptionstringNew description
is_archivedbooleanSet archive status

coaia_fuse_comments_list

List comments with optional filtering by object type/ID or author

ParameterTypeDescription
author_user_idstringFilter by author user ID
limitintegerItems per page
object_idstringFilter by specific object ID (requires object_type)
object_typestringFilter by object type (trace, observation, session, prompt)
pageintegerPage number (starts at 1)

coaia_fuse_comments_get

Get a specific comment by ID

ParameterTypeDescription
comment_id *stringThe unique Langfuse identifier of a comment

coaia_fuse_comments_create

Create a comment attached to an object (trace, observation, session, or prompt)

ParameterTypeDescription
object_id *stringID of the object to attach comment to - REQUIRED
object_type *stringType of object to attach comment to (trace, observation, session, prompt) - REQUIRED
text *stringThe comment text/content
author_user_idstringOptional user ID of the comment author

coaia_fuse_trace_delete

Delete a single trace from Langfuse.

ParameterTypeDescription
trace_id *stringTrace ID to delete

coaia_fuse_sessions_list

List sessions from Langfuse with optional filtering.

ParameterTypeDescription
environmentstringFilter by environment
limitintegerItems per page
pageintegerPage number (starts at 1)

coaia_fuse_session_get

Get a specific session by ID from Langfuse.

ParameterTypeDescription
session_id *stringSession ID to retrieve

coaia_fuse_observations_list

List observations using v2 API with cursor-based pagination and filters (trace, name, type, environment).

ParameterTypeDescription
cursorstringPagination cursor from previous response
environmentstringFilter by environment
from_start_timestringISO 8601 start time filter
limitintegerMax items (default 50)
namestringFilter by observation name
observation_typestringFilter by type
parent_observation_idstringFilter by parent observation
to_start_timestringISO 8601 end time filter
trace_idstringFilter by trace ID
user_idstringFilter by user ID
versionstringFilter by version