Skip to main content
Glama

guard_write_batch

Evaluate multiple proposed writes against AnchorIDs in batch. Get allowed or blocked decisions per item with reasons, enabling pre-write safety without actual writes.

Instructions

Batch pre-write safety check for multiple AnchorIDs (max 200). Each item needs a client_ref for correlation. Returns per-item allowed/blocked decisions with reasons. Evaluation-only — never writes.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
itemsYesArray of guard/write requests

Implementation Reference

  • src/tools.ts:322-324 (registration)
    Tool registration: 'guard_write_batch' is registered via server.tool() with name 'guard_write_batch'.
    // ─── 9. guard_write_batch ─────────────────────────────────────────
    server.tool(
      "guard_write_batch",
  • Input schema: Zod schema defining items as an array (max 200) of objects with client_ref, entity_id, min_confidence (optional), and require_no_conflicts (optional).
    {
      items: z
        .array(
          z.object({
            client_ref: z.string().describe("Your reference ID for correlation"),
            entity_id: z.string().describe("UUID of the AnchorID to evaluate"),
            min_confidence: z.number().min(0).max(1).optional(),
            require_no_conflicts: z.boolean().optional(),
          }),
        )
        .max(200)
        .describe("Array of guard/write requests"),
  • Handler function: async callback that POSTs the input to /guard/write:batch via the ApiClient and returns the JSON result or error.
    async (input) => {
      try {
        const data = await api.post(
          "/guard/write:batch",
          input as Record<string, unknown>,
        );
        return jsonContent(data);
      } catch (e) {
        return errorContent(e);
      }
    },
  • Full tool definition: registration (line 322-324), description (lines 325-327), schema (lines 328-339), and handler (lines 341-352).
    // ─── 9. guard_write_batch ─────────────────────────────────────────
    server.tool(
      "guard_write_batch",
      "Batch pre-write safety check for multiple AnchorIDs (max 200). " +
        "Each item needs a client_ref for correlation. Returns per-item " +
        "allowed/blocked decisions with reasons. Evaluation-only — never writes.",
      {
        items: z
          .array(
            z.object({
              client_ref: z.string().describe("Your reference ID for correlation"),
              entity_id: z.string().describe("UUID of the AnchorID to evaluate"),
              min_confidence: z.number().min(0).max(1).optional(),
              require_no_conflicts: z.boolean().optional(),
            }),
          )
          .max(200)
          .describe("Array of guard/write requests"),
      },
      async (input) => {
        try {
          const data = await api.post(
            "/guard/write:batch",
            input as Record<string, unknown>,
          );
          return jsonContent(data);
        } catch (e) {
          return errorContent(e);
        }
      },
    );
  • src/index.ts:25-25 (registration)
    Top-level registration entry point: registerTools(server) is called to register all tools including guard_write_batch.
    registerTools(server);
Behavior3/5

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

No annotations provided, so description carries full burden. Explicitly states 'Evaluation-only — never writes' and max 200 limit, but lacks details on permissions, error handling, or rate limits.

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

Conciseness5/5

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

Two sentences, front-loaded with core purpose and constraints. No wasted words; every sentence adds value.

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 no output schema, description adequately describes return value ('per-item allowed/blocked decisions with reasons'). Covers inputs, constraints, and behavior sufficiently for the tool's simplicity.

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 description coverage is 100%, so baseline is 3. Description adds minor reinforcement ('each item needs a client_ref') but does not significantly extend meaning beyond schema.

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 clearly states verb ('pre-write safety check'), resource ('multiple AnchorIDs'), and scope ('batch', max 200). Distinguished from sibling 'guard_write' by 'batch' and 'max 200'.

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?

Description implies use when checking multiple items and mentions evaluation-only nature. No explicit when-not or alternatives, but sibling context and batch specificity provide adequate guidance.

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/nolenation04/anchord-mcp'

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