Skip to main content
Glama

writing_import

Verify a harness-produced .tex document against writing gates and register it as a draft artifact; provide draft_path or draft_text, with draft_text taking precedence.

Instructions

Verify a harness-produced .tex document against the writing gates and register it as a draft artifact. Pass draft_path or draft_text (draft_text wins when both are given).

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": {
      "workspace": "<workspace>",
      "run_id": "<run_id>"
    },
    "name": "writing_import"
  }
}

Input Schema

NameRequiredDescriptionDefault
depthNo
titleNo
topicNo
phasesNo
run_idYes
outlineNo
abstractNo
main_texNo
sectionsNo
workspaceYes
draft_pathNo
draft_textNo
provenanceNo
cite_roundsNo
key_sourcesNo
plan_run_idNo
thesis_typeNo
instructionsNo
context_pathsNo
document_kindNo
document_pathNo
main_tex_pathNo
thesis_profileNo
reference_pathsNo
research_designNo
locators_payloadNo
provenance_blockNo
require_locatorsNo
bibliography_pathNo
min_grounding_ratioNo
context_budget_bytesNo
min_words_per_sectionNo
reference_budget_bytesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv4.2.0
    • changedInput schema / additionalProperties
      Previous value: -trueNew value: +false
    • addedInput schema / properties
      Added value: +{
      +  "abstract": {},
      +  "bibliography_path": {},
      +  "cite_rounds": {},
      +  "context_budget_bytes": {},
      +  "context_paths": {},
      +  "depth": {},
      +  "document_kind": {},
      +  "document_path": {},
      +  "draft_path": {
      +    "type": "string"
      +  },
      +  "draft_text": {
      +    "type": "string"
      +  },
      +  "instructions": {},
      +  "key_sources": {},
      +  "locators_payload": {},
      +  "main_tex": {},
      +  "main_tex_path": {},
      +  "min_grounding_ratio": {},
      +  "min_words_per_section": {},
      +  "outline": {},
      +  "phases": {},
      +  "plan_run_id": {
      +    "type": "string"
      +  },
      +  "provenance": {},
      +  "provenance_block": {},
      +  "reference_budget_bytes": {},
      +  "reference_paths": {},
      +  "require_locators": {},
      +  "research_design": {},
      +  "run_id": {
      +    "type": "string"
      +  },
      +  "sections": {},
      +  "thesis_profile": {},
      +  "thesis_type": {},
      +  "title": {},
      +  "topic": {},
      +  "workspace": {
      +    "type": "string"
      +  }
      +}
    • addedInput schema / required
      Added value: +[
      +  "workspace",
      +  "run_id"
      +]
  2. First observedv4.0.0

TDQS

C2.4/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It implies a mutation ('register it as a draft artifact') but does not say what the writing gates check, what happens on gate failure, whether an existing draft is overwritten, or what permissions or side effects are involved.

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?

Two sentences, front-loaded with the core action and followed by the one precedence rule. It is tight and readable, though the extreme brevity leaves needed parameter and gate information unaddressed.

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

Completeness1/5

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

For a 33-parameter tool with no annotations and no output schema, the description is far too sparse. It does not explain the gate behavior, the return or failure behavior, or the meaning of the many optional configuration parameters.

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

Parameters1/5

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

The schema has 33 parameters with 0% description coverage, and the description clarifies only two of them (draft_path, draft_text) plus their precedence. Parameters such as phases, provenance, require_locators, min_grounding_ratio, and budget fields receive no explanation in either the schema or the description.

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?

The description states a specific compound action: verify a harness-produced .tex document against 'writing gates' and register it as a draft artifact. This distinguishes it from siblings like writing_pack or writing_patch. However, it does not explicitly explain how it differs from writing_pack or pack_import, both of which could plausibly ingest artifacts.

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?

The only concrete usage guidance is the draft_path versus draft_text precedence rule. There is no guidance on when to use this instead of writing_pack or pack_import, what 'harness-produced' requires, or what prerequisites the workspace and run_id imply.

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