Skip to main content
Glama

hub_resource_set

Create or update infrastructure resources and topology entities with structured attributes and typed relationships, keeping host, VM, service, endpoint, and provider data out of prose.

Instructions

Create or update a resource — an infrastructure/topology entity: host, vm, service, endpoint, or provider. Structured attributes (type, address, os, provider, status) and typed relationships go in fields, NOT prose. Use this instead of describing infra inside a card digest.

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": {
      "slug": "<slug>",
      "by": "<by>"
    },
    "name": "hub_resource_set"
  }
}

Input Schema

NameRequiredDescriptionDefault
byYeswho is writing
osNo
slugYesresource id, e.g. "vm1" or "board.example.com"
typeNohost | vm | service | endpoint | provider | ... (open vocabulary)
attrsNoany other one-line attributes, merged with existing; an empty value removes the key. A role is a card of type "role": {"rank":"worker","project":"api","head":"[[api-head]]","idle_min":"40"}
edgesNotyped relationships, merged with existing: {"runs_on":["hubd"],"depends_on":["postgres"]}. Values are target slugs.
digestNoone-line description (keep prose minimal)
statusNolive | down | planned | retired
addressNoip / hostname / url, optional
providerNolibvirt | cloudflare | bare-metal | ...

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.9.88
    • addedInput schema / properties / attrs
      Added value: +{
      +  "additionalProperties": {
      +    "type": "string"
      +  },
      +  "description": "any other one-line attributes, merged with existing; an empty value removes the key. A role is a card of type \"role\": {\"rank\":\"worker\",\"project\":\"api\",\"head\":\"[[api-head]]\",\"idle_min\":\"40\"}",
      +  "type": "object"
      +}
    • changedInput schema / properties / slug / description
      Previous value: -"resource id, e.g. \"myvm\" or \"board.hubd.net\""New value: +"resource id, e.g. \"vm1\" or \"board.example.com\""
  2. Changed1 schema field changedv0.5.0
    • changedInput schema / required
      Previous value: -[
      -  "slug"
      -]New value: +[
      +  "slug",
      +  "by"
      +]
  3. Addedv0.1.8

TDQS

A4.1/5.0
Behavior3/5

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

No annotations are supplied, so the description must carry the behavioral burden. It discloses that this is an upsert ("Create or update") rather than a pure create, and that merge semantics apply to attributes and edges, but it says nothing about permissions, whether top-level fields are replaced or merged on update, or what a call returns.

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?

Three short sentences, front-loaded with the verb+resource and entity types, then the field-vs-prose rule, then the sibling exclusion. Nothing is redundant and nothing could be cut without losing instruction.

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

Completeness3/5

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

For a 10-parameter upsert tool with nested objects, no annotations and no output schema, the description covers purpose and data placement but leaves the update contract underspecified: whether omitted fields are preserved, how required parameters (slug, by) are used, and what the response contains are unstated.

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

Parameters4/5

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

Schema coverage is 90%, so the schema already documents most parameters and baseline 3 applies. The description still adds a normative rule the schema does not state: structured attributes and typed relationships belong in fields rather than prose, which tells the agent how to split content between attrs/edges and digest.

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?

States specific verbs (create or update), the resource being written (an infrastructure/topology entity) and enumerates accepted subtypes: host, vm, service, endpoint, provider. It also distinguishes itself from the sibling pattern of writing infra into a card digest, so an agent can tell it apart from hub_card_set without opening either schema.

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?

"Use this instead of describing infra inside a card digest" gives an explicit alternative and the condition that selects this tool, and "Structured attributes ... go in fields, NOT prose" prescribes where data belongs. It does not spell out the reverse case (when a card is the right target) or note that reading resources back is a separate tool.

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