get_dataverse_table
Retrieve detailed metadata and configuration information for a specific Dataverse table to inspect its structure and properties.
Instructions
Retrieves detailed information about a specific Dataverse table including its metadata, properties, and configuration. Use this to inspect table definitions and understand table structure.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| logicalName | Yes | Logical name of the table to retrieve |
Implementation Reference
- src/tools/table-tools.ts:166-191 (handler)Handler function that retrieves detailed metadata for a Dataverse table by its logical name using the DataverseClient's getMetadata method.async (params) => { try { const result = await client.getMetadata<EntityMetadata>( `EntityDefinitions(LogicalName='${params.logicalName}')` ); return { content: [ { type: "text", text: `Table information for '${params.logicalName}':\n\n${JSON.stringify(result, null, 2)}` } ] }; } catch (error) { return { content: [ { type: "text", text: `Error retrieving table: ${error instanceof Error ? error.message : 'Unknown error'}` } ], isError: true }; } }
- src/tools/table-tools.ts:159-165 (schema)Input schema and metadata (title, description) for the get_dataverse_table tool, requiring a 'logicalName' string.{ title: "Get Dataverse Table", description: "Retrieves detailed information about a specific Dataverse table including its metadata, properties, and configuration. Use this to inspect table definitions and understand table structure.", inputSchema: { logicalName: z.string().describe("Logical name of the table to retrieve") } },
- src/tools/table-tools.ts:157-192 (registration)Registers the 'get_dataverse_table' tool on the MCP server within the getTableTool function.server.registerTool( "get_dataverse_table", { title: "Get Dataverse Table", description: "Retrieves detailed information about a specific Dataverse table including its metadata, properties, and configuration. Use this to inspect table definitions and understand table structure.", inputSchema: { logicalName: z.string().describe("Logical name of the table to retrieve") } }, async (params) => { try { const result = await client.getMetadata<EntityMetadata>( `EntityDefinitions(LogicalName='${params.logicalName}')` ); return { content: [ { type: "text", text: `Table information for '${params.logicalName}':\n\n${JSON.stringify(result, null, 2)}` } ] }; } catch (error) { return { content: [ { type: "text", text: `Error retrieving table: ${error instanceof Error ? error.message : 'Unknown error'}` } ], isError: true }; } } );
- src/index.ts:140-140 (registration)Top-level call to getTableTool which registers the get_dataverse_table tool on the main MCP server instance.getTableTool(server, dataverseClient);