@mafdet/mcp 0.1.4 → 0.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -25,7 +25,7 @@ OpenAI API works by pointing its base URL and key at Mafdet AI.
25
25
 
26
26
  | Tool | Needs a key | What it does |
27
27
  | --- | --- | --- |
28
- | `list_models` | no | List Mafdet AI models with provider, tier, and per-1M-token pricing |
28
+ | `list_models` | no | List Mafdet AI models with provider, tier, per-1M-token pricing, and a `[preview]` / `[beta]` marker for models the provider has not declared generally available |
29
29
  | `search_docs` | no | Search the Mafdet AI documentation (titles, URLs, summaries) |
30
30
  | `get_balance` | yes | Your organization's wallet: balance, bonus, frozen, available |
31
31
  | `get_usage_summary` | yes | Requests, tokens, and charge over the last N days (1–90) |
package/dist/tools.js CHANGED
@@ -70,10 +70,18 @@ export async function listModels(config, args = {}) {
70
70
  if (models.length === 0) {
71
71
  return ok("No models matched the filter.");
72
72
  }
73
- const lines = models.map((m) => `- ${m.model_id} (${m.provider}, ${m.tier})` +
74
- `${m.trial ? " [trial]" : ""}${m.deprecated ? " [deprecated]" : ""}` +
75
- `${m.output_modalities.includes("IMAGE") ? " [image-out]" : ""}` +
76
- ` — in ${money(m.input_per_1m_micro_usd)}/1M, out ${money(m.output_per_1m_micro_usd)}/1M, ctx ${m.context_length}`);
73
+ const lines = models.map((m) => {
74
+ // The catalogue marks non-GA models in the display name, and the docs
75
+ // site derives its badge from the same string. Without this the rendered
76
+ // line shows only model_id, so an agent reading this list cannot tell a
77
+ // preview model from a GA one.
78
+ const stage = /\((preview|beta)\)/i.exec(String(m.display_name ?? ""));
79
+ return (`- ${m.model_id} (${m.provider}, ${m.tier})` +
80
+ `${stage ? ` [${stage[1].toLowerCase()}]` : ""}` +
81
+ `${m.trial ? " [trial]" : ""}${m.deprecated ? " [deprecated]" : ""}` +
82
+ `${m.output_modalities.includes("IMAGE") ? " [image-out]" : ""}` +
83
+ ` — in ${money(m.input_per_1m_micro_usd)}/1M, out ${money(m.output_per_1m_micro_usd)}/1M, ctx ${m.context_length}`);
84
+ });
77
85
  return ok(`Mafdet AI models (${models.length}):\n${lines.join("\n")}`);
78
86
  }
79
87
  catch (error) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mafdet/mcp",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
4
4
  "description": "Mafdet AI MCP server — read-only account tools (models, balance, usage, subscription, docs) for Claude Code, Cursor, Codex, OpenCode, and Claude Desktop.",
5
5
  "type": "module",
6
6
  "license": "MIT",