Skip to main content
Glama

Write a ported unit

port_write

Writes ported files for a unit into the output project and records progress; reports leftovers, TODO markers, missing functions/signals, and the next unit. Copy assets or mark partial/skipped.

Instructions

Writes the ported file(s) for a unit into the output project (never outside it) and records progress. Returns leftovers (source-engine APIs still present), PORT/TODO markers, source functions/signals missing in the port, and the next unit. copy:true copies an asset unchanged. Give exactly one of content, files or copy. status partial/skipped with notes when something cannot be ported yet.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "planId": "<planId>",
      "unit": "<unit>"
    },
    "name": "port_write"
  }
}

Input Schema

NameRequiredDescriptionDefault
copyNoCopy the source file unchanged (assets).
unitYesUnit id or path.
filesNoSeveral files (e.g. Unreal .h and .cpp).
notesNoWhat is left or why it was skipped.
planIdYesPort plan id from port_plan (port_status lists them).
statusNodone (default), partial or skipped.
contentNoFile content for the unit target.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.25.0

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare the mutation profile (readOnlyHint=false, destructiveHint=false, openWorldHint=false), and the description adds real value on top: the write is confined to the output project, progress is recorded, and the response payload is enumerated (leftovers, PORT/TODO markers, missing source functions/signals, next unit). It does not discuss overwrite behavior for an existing target file, which is the main remaining gap for a non-idempotent write.

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?

Front-loaded with the action and its scope, then the return payload, then the parameter rules. No sentence is wasted, though the trailing fragments ('copy:true copies an asset unchanged', 'status partial/skipped with notes...') are compressed to the point of being slightly clipped.

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

Completeness4/5

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

With no output schema, the description correctly takes on the burden of describing return values, and it does so explicitly. Combined with the write-scope guarantee and mode exclusivity, an agent has enough to invoke it correctly; only overwrite/idempotency behavior is unaddressed.

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 coverage is 100%, so the schema already documents all seven parameters; the baseline would be 3. The description does add one genuine constraint the schema cannot express — mutual exclusivity of content, files and copy — plus the meaning of copy:true, but it leaves notes/status interplay to a single telegraphic clause.

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

Purpose4/5

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

States a specific verb and resource: writes the ported file(s) for a unit into the output project and records progress. The scope constraint '(never outside it)' and the mention of progress recording make the operation concrete, though it never names a sibling (port_copy_assets, port_verify) to distinguish itself from.

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

Usage Guidelines3/5

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

Gives invocation rules rather than selection guidance: 'Give exactly one of content, files or copy' and 'status partial/skipped with notes when something cannot be ported yet' tell the agent how to call it and when to downgrade status. It never says when to prefer this over port_copy_assets or port_verify, so alternative-routing is left implicit.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.