Skip to main content
Glama
Log-LogN

langfuse-mcp-java

create_model

create_model
Destructive

Define custom models for cost tracking and token pricing in Langfuse. Set pricing per unit (tokens, characters, etc.) and match patterns to monitor AI usage costs.

Instructions

Creates a custom model definition for cost tracking and token pricing. modelName, matchPattern, and unit are required. unit values: TOKENS | CHARACTERS | MILLISECONDS | SECONDS | IMAGES | REQUESTS. Prices are per unit in USD (e.g. inputPrice=0.000001 means $1 per million tokens). Omit prices for models where you do not want cost tracking. startDate format: ISO-8601 date, e.g. 2025-01-01T00:00:00Z.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modelNameYesModel name used for display and matching. Required.
matchPatternYesRegex pattern to match against generation model names. Required.
unitYesPricing unit: TOKENS | CHARACTERS | MILLISECONDS | SECONDS | IMAGES | REQUESTS. Required.
inputPriceYesInput price per unit in USD. Omit if not tracking input cost.
outputPriceYesOutput price per unit in USD. Omit if not tracking output cost.
totalPriceYesTotal price per unit in USD (alternative to input/output split). Omit if using input/output prices.
Behavior2/5

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

While annotations indicate destructiveHint=true and openWorldHint=true, the description adds domain context (USD pricing, units). However, it introduces significant misleading information by claiming prices can be omitted and referencing a non-existent 'startDate' parameter not present in the schema.

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

Conciseness3/5

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

Efficiently structured with targeted sentences, but includes wasted space describing the non-existent startDate parameter and incorrect requirement constraints.

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?

For a destructive mutation tool with 6 parameters, the description fails to accurately document the API contract. The incorrect requirement specifications and missing parameter mean the agent cannot trust the description for invocation guidance.

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?

Despite 100% schema coverage (baseline 3), the description incorrectly states only 3 parameters are required when the schema marks all 6 as required, and references a phantom 'startDate' parameter. It does add value by enumerating unit values and providing price calculation examples.

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?

Description provides specific verb (Creates), resource (custom model definition), and clear domain context (cost tracking and token pricing) that distinguishes it from generic 'create' operations.

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?

Provides guidance on omitting prices when cost tracking isn't needed, but this contradicts the schema where price fields are required. No comparison to sibling tools (e.g., get_model vs create_model) or when to use each.

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/Log-LogN/langfuse-mcp-java'

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