Skip to main content
Glama
Mipiti
by Mipiti

refine_threat_model

Refine an existing threat model based on an instruction.

Instructions

Refine an existing threat model based on an instruction.

Updates the model's assets, attackers, trust boundaries, and control objectives based on the instruction. Creates a new version. Progress is reported automatically.

Refine CANNOT silently replace an entity's identity under a stable ID or silently drop an entity. Behavior:

  • Preserved entities where the LLM proposed an identity- bearing rewrite (name / description / security_properties on assets; capability / archetype / position on attackers) run through a semantic-preservation guard. Rewrites classified as replace or ambiguous (or unavailable if the gate LLM is down) have their identity fields REVERTED to the pre-refine values. Each rejection shows up as an entry in the semantic_rejections array in this tool's return value — surface these to the operator.

  • Entities the LLM drops from the refined output are re- appended to the model unchanged. The only sanctioned removal path is remove_entity (entity_type="asset") / remove_entity (entity_type="attacker") (soft-delete).

  • CO IDs are stable across refinements; pairs (asset, attacker) that disappear come back as tombstones with removed=True (not renumbered). Controls that only mapped to tombstoned COs become orphaned at read time.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
model_idYesID of the threat model to refine.
instructionYesWhat to change, e.g. "Add CSRF attack vectors".
server_versionYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

With no annotations present, the description provides extensive behavioral details: it creates a new version, reports progress, prevents silent replacement/dropping of entities, handles semantic rejections via 'semantic_rejections', ensures stable CO IDs, and uses soft-delete via remove_entity. This is excellent transparency for a complex mutation tool.

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

Conciseness4/5

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

The description is structured with bullet points and sections, making it easy to scan. It is longer than average but every detail serves to clarify critical behavior (preservation, rejection, versioning). Could be trimmed slightly but it's well-organized.

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

Completeness5/5

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

Given the complexity of the tool (semantic preservation, rejection arrays, versioning, tombstones), the description covers all critical aspects. The presence of an output schema for return values reduces the need to describe them. This is complete enough for an agent to use 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 covers 67% of parameters (model_id, instruction). The description adds context for 'instruction' via example but does not explain server_version. Since schema coverage is moderate, the description provides minimal additional value beyond the schema. Baselines: with >80% coverage, score is 3, but here it's 67% so expect more, but description doesn't add much about params, so 3 is fair.

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 first sentence clearly states the action ('Refine an existing threat model based on an instruction') and specifies what is refined (assets, attackers, trust boundaries, control objectives). This distinctly separates it from siblings like generate_threat_model or edit_asset, as it's for whole-model refinement via natural language instruction.

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

Usage Guidelines4/5

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

The description communicates when to use this tool (to refine an existing model via instruction) and implicitly contrasts with other tools by describing what it cannot do (e.g., silently replace entities) and referencing remove_entity as the way to delete entities. However, it does not explicitly compare to alternative tools like edit_asset or generate_threat_model, so there's room for explicit differentiation.

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/Mipiti/mipiti-mcp'

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