Skip to main content
Glama
us-all

mlflow-mcp-server

by us-all

set-trace-tag

Add a custom key-value tag to a trace to annotate or categorize it.

Instructions

Add a custom key-value tag to a trace

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
traceIdYes
keyYesTag key
valueYesTag value

Implementation Reference

  • The function that executes the set-trace-tag tool logic. It sends a PATCH request to /api/2.0/mlflow/traces/{traceId}/tags with the key and value.
    export async function setTraceTag(params: z.infer<typeof setTraceTagSchema>) {
      assertWriteAllowed();
      return mlflowClient.patch(
        `/api/2.0/mlflow/traces/${encodeURIComponent(params.traceId)}/tags`,
        { key: params.key, value: params.value },
      );
    }
  • Zod schema for setTraceTag input validation: traceId (string), key (string), value (string).
    export const setTraceTagSchema = z.object({
      traceId: z.string(),
      key: z.string().describe("Tag key"),
      value: z.string().describe("Tag value"),
    });
  • src/index.ts:238-238 (registration)
    Registration of the 'set-trace-tag' MCP tool with its schema and handler.
    tool("set-trace-tag", "Add a custom key-value tag to a trace", setTraceTagSchema.shape, wrapToolHandler(setTraceTag));
  • Imported helper assertWriteAllowed ensures writes are permitted before executing the tool.
    import { applyExtractFields, assertWriteAllowed, resolveExperimentId } from "./utils.js";
Behavior2/5

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

No annotations provided, so description carries full burden. Only states 'add' without disclosing whether it overwrites existing tags, limits, or idempotency.

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?

Single sentence, concise and direct. No unnecessary words.

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

Completeness3/5

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

For a simple 3-param tool, the description covers the basic purpose but lacks behavioral context (e.g., overwrite behavior, idempotency). Adequate but not complete.

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

Parameters2/5

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

Schema coverage is 67% with brief descriptions for key and value. The description adds no extra meaning beyond the schema, and does not elaborate on parameter constraints or format.

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

Purpose5/5

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

The description 'Add a custom key-value tag to a trace' clearly states the action and resource, distinguishing it from sibling tools like delete-trace-tag and set-run-tag.

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 on when to use this tool vs alternatives. Does not mention prerequisites, overwrite behavior, or context for using tags.

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/us-all/mlflow-mcp-server'

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