Renamed to describe_entities (no longer list_entities)
The reason for the rename is that "list" seems like a verb to query the records.
What?
describe_entities
The describe_entities tool is required to enable all the other MCP DML tools.
Behavior
-
This tool is intended to be the first tool called by agents.
-
This tool does not interact with the database; it reads our in-mem metadata.
- It might be that our current metadata does not contain all the values in the output payload definition. If this is true, we should discuss this, but extending our metadata query is likely where we will land, depending on the missing value. The more information we can provide models, the more accurate data agents can be. We want to enable accuracy.
-
This tool can limit payload size to reduce token usage.
- Agents can request only entity names and descriptions.
- Agents can filter to a specific list of entity names.
-
This tool also limits payload content based on the calling role.
- The tool ONLY includes entities where AT LEAST ONE of the CRUD/E permissions is allowed for the calling role.
-
This tool respects configuration.
- The tool only responds when
runtime.mcp.dml-tools = true OR runtime.mcp.dml-tools.describe-entities = true
- The tool only includes entities where
entity.mcp.dml-tools = true
How
Tool method
/// <summary>
/// Returns the list of entities available to the current role,
/// including fields, keys, parameters (for procedures), and permissions.
/// Does not interact with the database; reads from in-memory metadata only.
/// </summary>
Task<IReadOnlyList<EntityMetadata>> DescribeEntitiesAsync(
[Description("If not provided, full entity metadata is returned. "
+ "This may be a large payload. "
+ "Set to true to return only entity names and descriptions (omit fields, keys, and permissions). "
+ "Optional. Default is false.")]
bool namesOnly = false,
[Description("Optional list of entity names to filter the results. "
+ "Entity names must match those returned by list_entities. "
+ "If not provided, all entities available to the current role are returned.")]
IEnumerable<string>? entities = null);
Parameters
- namesOnly (bool, optional, default: false)
// If true, only entity name + description are returned.
if (namesOnly)
return metadata.Select(e => new EntityMetadata { Name = e.Name, Description = e.Description }).ToList();
- entities (IEnumerable?, optional)
// If supplied, filter metadata to the specified entities.
if (entities != null && entities.Any())
metadata = metadata.Where(e => entities.Contains(e.Name, StringComparer.OrdinalIgnoreCase)).ToList();
Example calls
// Get full metadata for all entities
await DescribeEntitiesAsync();
// Get names and descriptions only
await DescribeEntitiesAsync(namesOnly: true);
// Get full metadata for specific entities
await DescribeEntitiesAsync(entities: new [] { "User", "Order" });
Output payload
This metadata should be a mix of db metadata and the DAB configuration.
- Entities and fields should not be included if role has no permissions.
- DAB
include and exclude field permission settings should be obeyed.
- Permissions must reflect both dab-config.json and role-based security at runtime.
Why?
To enable the other DML (Data Manipulation Language) tools.
Configuration
Command line
Add dab --configure runtime.mcp.dml-tools.describe-entities.enabled true
Renamed to
describe_entities(no longer list_entities)The reason for the rename is that "list" seems like a verb to query the records.
What?
describe_entities
The
describe_entitiestool is required to enable all the other MCP DML tools.Behavior
This tool is intended to be the first tool called by agents.
This tool does not interact with the database; it reads our in-mem metadata.
This tool can limit payload size to reduce token usage.
This tool also limits payload content based on the calling role.
This tool respects configuration.
runtime.mcp.dml-tools = trueORruntime.mcp.dml-tools.describe-entities = trueentity.mcp.dml-tools = trueHow
describe_entitiesMCP tool (metadata only, no db access)runtime.mcp.dml-tools.describe-entities.enabled=true)runtime.mcp.dml-tools.describe-entities.enabledruntime.mcp.dml-tools.describe-entities.enabled=true)dab configure --runtime.mcp.dml-tools.describe-entities.enabled truedab validate(warn whendescribe-entities.enabledand notmcp.enabled)entity.mcp.dml-tools=true)entity.mcp.dml-toolsentity.mcp.dml-tools)dab add User --mcp.dml-tools truedab udpate User --mcp.dml-tools trueTool method
Parameters
Example calls
Output payload
This metadata should be a mix of db metadata and the DAB configuration.
includeandexcludefield permission settings should be obeyed.Why?
To enable the other DML (Data Manipulation Language) tools.
Configuration
Command line
Add
dab --configure runtime.mcp.dml-tools.describe-entities.enabled true