Skip to content

Conversation

souvikghosh04
Copy link
Contributor

@souvikghosh04 souvikghosh04 commented Sep 26, 2025

Why make this change?

Closes on

What is this change?

This PR implements built-int tool delete_record as part of built-in tools to support delete operation on a table entity.

  • deletes one record at a time
  • Entity name and Keys should be specified
  • Keys supports having a single primary key or composite key (refer sample request below)
  • Operation is performed based on permissions as configured in dab-config
  • Success or Failure message response is generated on execution of the delete operation

How was this tested?

Functional testing using Insomnia client by running DAB in localhost and local SQL DB database

Sample Request(s)

Delete by single Primary Key

POST: http://localhost:5000/mcp

{
  "jsonrpc": "2.0",
  "id": 2,
  "method": "tools/call",
  "params": {
    "name": "delete_record",
    "arguments": {
      "entity": "Book",
      "keys": {
        "id": 5009
      }
    }
  }
}


Delete by a composite key


POST http://localhost:5000/mcp
{
  "jsonrpc": "2.0",
  "id": 2,
  "method": "tools/call",
  "params": {
    "name": "delete_record",
    "arguments": {
      "entity": "Stock",
      "keys": {
        "categoryid": 10,
	     "pieceid": 1
      }
    }
  }
}

Jerry Nixon and others added 30 commits August 27, 2025 15:06
This reverts commit 04b19f9, reversing
changes made to 3948822.
…a-api-builder into jerry-mcp-core"

This reverts commit 0b649dbbc877a8ad009ac31eb4a082664d49bce3, reversing
changes made to 2240172.
## Why make this change?

- Introduces a dedicated runtime layer for MCP

## What is this change?

- Adds a runtime initialization module that centralizes configuration
load, validation, DI registration, and service/materialization order.
- Refactors existing startup code into clearer phases; removes
duplicated wiring.
- Improves logging structure and prepares for future feature flags /
layered config overrides.
- Cleans up deprecated code paths (overall net +901 / −130 LOC).
- No intentional breaking changes (verify before merge).

## How was this tested?

- [ ] Integration Tests
- [ ] Unit Tests

## Sample Request(s)

- Discover tools: POST `http://localhost:5000/mcp`

JSON body

```
{
  "jsonrpc": "2.0",
  "id": "1",
  "method": "tools/list",
  "params": {}
}
```

- List entities: POST `http://localhost:5000/mcp`

JSON body

```
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "list_entities"
  }
}
```

---------

Co-authored-by: Rahul Nishant <[email protected]>
Co-authored-by: RubenCerna2079 <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Aniruddh Munde <[email protected]>
@souvikghosh04
Copy link
Contributor Author

/azp run

Copy link

Azure Pipelines successfully started running 6 pipeline(s).

@souvikghosh04 souvikghosh04 linked an issue Oct 9, 2025 that may be closed by this pull request
6 tasks
@souvikghosh04 souvikghosh04 moved this from Todo to Review In Progress in Data API builder Oct 9, 2025
@souvikghosh04 souvikghosh04 changed the title [MCP] Adding delete-entity [MCP] Adding delete-record Oct 9, 2025
@souvikghosh04 souvikghosh04 changed the title [MCP] Adding delete-record [MCP] Adding delete_record Oct 13, 2025
@RubenCerna2079
Copy link
Contributor

/azp run

Copy link

Azure Pipelines successfully started running 6 pipeline(s).

Copy link
Contributor

@RubenCerna2079 RubenCerna2079 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left some comments based on some necessary requirements Aniruddh and Anusha talked about. Besides that, it LGTM!

@souvikghosh04
Copy link
Contributor Author

/azp run

Copy link

Azure Pipelines successfully started running 6 pipeline(s).

@souvikghosh04 souvikghosh04 enabled auto-merge (squash) October 15, 2025 06:15
Copy link
Contributor

@aaronburtle aaronburtle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@souvikghosh04 souvikghosh04 merged commit d6404b3 into main Oct 15, 2025
11 checks passed
@souvikghosh04 souvikghosh04 deleted the Usr/sogh/mcpdev branch October 15, 2025 11:05
@github-project-automation github-project-automation bot moved this from Review In Progress to Done in Data API builder Oct 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mcp-server mssql an issue thats specific to mssql

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

[Enh]: Add DML tool: delete_record

5 participants