Skip to main content
Glama

add_entity

Destructive

Creates an ERD entity (block with kind='entity') ready to receive typed fields. Fits when modeling a data table; an org-chart block belongs to add_cell.

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": {
      "id": "<id>",
      "name": "<name>"
    },
    "name": "add_entity"
  }
}

Input Schema

NameRequiredDescriptionDefault
xNoX position in pixels. x/y omitted (recommended): automatic placement, then auto_layout_mcd for the final tidy-up.
yNoY position in pixels. See x — leaving it absent = automatic placement.
idYesUnique kebab-case ID of the entity
descNoShort description
nameYesDisplay name of the entity
widthNoWidth in pixels (default auto-sized)
heightNoHeight in pixels (default auto-sized)
colorKeyNoColor of the entity (default 'blue')
parentIdNoID of the parent entity if nested
kindMetadataNoPostgres metadata of the table: schemaNamespace (chip 'auth.users'), rlsPolicy (chip 🔒 + DDL export), piiFields (GDPR), expectedRowCount. REPLACES the existing block; {} clears everything, an omitted field is not touched.
expectedProjectIdNoUUID of the project THIS call targets (overrides the session project).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / id / description
      Previous value: -"Unique kebab-case ID of the entity (e.g. 'users', 'user-roles')"New value: +"Unique kebab-case ID of the entity"
    • changedInput schema / properties / name / description
      Previous value: -"Display name of the entity (e.g. 'Users')"New value: +"Display name of the entity"
  2. Changed1 schema field changed
    • changedInput schema / properties / expectedProjectId / description
      Previous value: -"UUID of the project THIS call targets (overrides the session project). No access: refused, nothing changed."New value: +"UUID of the project THIS call targets (overrides the session project)."
  3. Changed1 schema field changed
    • changedInput schema / properties / expectedProjectId / description
      Previous value: -"UUID of the project targeted by THIS call. ACTUALLY targets this project instead of the session project. Refused without changing anything if access is not granted."New value: +"UUID of the project THIS call targets (overrides the session project). No access: refused, nothing changed."
  4. Changed14 schema fields changed
    • changedInput schema / properties / colorKey / description
      Previous value: -"Couleur de l'entité (défaut 'blue')"New value: +"Color of the entity (default 'blue')"
    • changedInput schema / properties / desc / description
      Previous value: -"Description courte"New value: +"Short description"
    • changedInput schema / properties / expectedProjectId / description
      Previous value: -"UUID du projet visé par CET appel. Cible RÉELLEMENT ce projet au lieu du projet de session. Refusé sans rien modifier si l'accès n'est pas accordé."New value: +"UUID of the project targeted by THIS call. ACTUALLY targets this project instead of the session project. Refused without changing anything if access is not granted."
    • changedInput schema / properties / height / description
      Previous value: -"Hauteur en pixels (défaut auto-sized)"New value: +"Height in pixels (default auto-sized)"
    • changedInput schema / properties / id / description
      Previous value: -"ID unique kebab-case de l'entité (ex: 'users', 'user-roles')"New value: +"Unique kebab-case ID of the entity (e.g. 'users', 'user-roles')"
    • changedInput schema / properties / kindMetadata / description
      Previous value: -"Métadonnées Postgres de la table : schemaNamespace (chip 'auth.users'), rlsPolicy (chip 🔒 + export DDL), piiFields (RGPD), expectedRowCount. REMPLACE le bloc existant ; {} efface tout, un champ omis n'est pas touché."New value: +"Postgres metadata of the table: schemaNamespace (chip 'auth.users'), rlsPolicy (chip 🔒 + DDL export), piiFields (GDPR), expectedRowCount. REPLACES the existing block; {} clears everything, an omitted field is not touched."
    • changedInput schema / properties / kindMetadata / properties / piiFields / description
      Previous value: -"Champs porteurs de données personnelles — point rouge RGPD sur la rangée + tooltip."New value: +"Fields carrying personal data — red GDPR dot on the row + tooltip."
    • changedInput schema / properties / kindMetadata / properties / piiFields / items / properties / fieldId / description
      Previous value: -"ID du champ concerné (celui passé à add_field)"New value: +"ID of the field concerned (the one passed to add_field)"
    • changedInput schema / properties / kindMetadata / properties / piiFields / items / properties / piiClass / description
      Previous value: -"Nature de la donnée personnelle"New value: +"Nature of the personal data"
    • changedInput schema / properties / name / description
      Previous value: -"Nom affiché de l'entité (ex: 'Utilisateurs')"New value: +"Display name of the entity (e.g. 'Users')"
    • changedInput schema / properties / parentId / description
      Previous value: -"ID de l'entité parente si imbriqué"New value: +"ID of the parent entity if nested"
    • changedInput schema / properties / width / description
      Previous value: -"Largeur en pixels (défaut auto-sized)"New value: +"Width in pixels (default auto-sized)"
    • changedInput schema / properties / x / description
      Previous value: -"Position X en pixels. x/y omis (recommandé) : placement automatique, puis auto_layout_mcd pour la mise au propre finale."New value: +"X position in pixels. x/y omitted (recommended): automatic placement, then auto_layout_mcd for the final tidy-up."
    • changedInput schema / properties / y / description
      Previous value: -"Position Y en pixels. Voir x — laisser absent = placement auto."New value: +"Y position in pixels. See x — leaving it absent = automatic placement."
  5. Changed2 schema fields changed
    • changedInput schema / properties / kindMetadata / description
      Previous value: -"Métadonnées Postgres de la table : schemaNamespace (chip 'auth.users'), rlsPolicy (chip 🔒 + export DDL), piiFields (RGPD), expectedRowCount. REMPLACE le bloc existant ; {} efface tout, omettre le champ ne touche à rien."New value: +"Métadonnées Postgres de la table : schemaNamespace (chip 'auth.users'), rlsPolicy (chip 🔒 + export DDL), piiFields (RGPD), expectedRowCount. REMPLACE le bloc existant ; {} efface tout, un champ omis n'est pas touché."
    • changedInput schema / properties / x / description
      Previous value: -"Position X en pixels. OMETS x/y (recommandé) : placement automatique, puis auto_layout_mcd pour la mise au propre finale."New value: +"Position X en pixels. x/y omis (recommandé) : placement automatique, puis auto_layout_mcd pour la mise au propre finale."
  6. First observed

TDQS

A4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false, destructiveHint=true and openWorldHint=false, and the description adds useful workflow context ('ready to receive typed fields' implies a follow-up add_field). However, it never explains why this create operation is flagged destructive — the replace/clear semantics of kindMetadata and what happens on an id collision are left to the schema. With annotations carrying the safety profile, this is adequate but not rich.

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 compact sentences with the core purpose front-loaded and the sibling distinction immediately after. There is no filler or restatement of the title.

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?

For an 11-parameter tool with a nested metadata object and no output schema, the description covers identity and role but leans entirely on the (fully documented) schema for positioning, nesting and replacement semantics. What is missing is a note on duplicate-id behavior and on when to prefer add_entity_with_fields; otherwise an agent has enough to call it 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 description coverage is 100%, including detailed semantics for kindMetadata, x/y auto-placement and expectedProjectId, so the schema does the heavy lifting and the baseline is 3. The description only adds the implicit 'kind=entity' framing and does not elaborate on any of the 11 parameters.

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 a specific verb and resource ('Creates an ERD entity') and pins down the underlying representation ('block with kind="entity"') plus its intended follow-up state ('ready to receive typed fields'). It explicitly distinguishes the ERD case from the org-chart case by naming add_cell, so an agent can tell these apart without opening schemas.

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?

Gives a clear positive condition ('Fits when modeling a data table') and an explicit exclusion routing org-chart blocks to add_cell. It does not address the very close sibling add_entity_with_fields (create entity plus fields in one call), which is the obvious alternative an agent should weigh, so the routing guidance is clear but incomplete.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.