Skip to content

mcp_execute_webapi

PhuocLe edited this page Jun 18, 2026 · 3 revisions

execute_webapi

Summary

Field Value
Tool name execute_webapi
MCP title Execute a raw Web API request
Category advanced
Implementation DynamicsCrm.DevKit.Cli/Mcp/Tools/ExecuteWebApiTool.cs
Estimated token count ~377 tokens (tools/list tool JSON, o200k_base, measured 2026-06-18)
Last verified 2026-06-18

MCP Tool Description (Exact)

Raw Dataverse Web API call. Allowed: GET (any), POST/PATCH/PUT/DELETE on data records + custom actions. Blocked at runtime (use specialized tool): schema/metadata→upsert_table/upsert_column/upsert_relationship; choice→manage_choice; form/view→manage_form/manage_view; app/sitemap→manage_app; env vars→manage_environment_variable; webresource→manage_webresource; roles→manage_role; publish→publish_customizations; solutions/plugins/workflows/apps→DevKit CLI or Power Apps UI. url is relative; SDK adds base URL. PUT/PATCH/DELETE destructive — confirm.

NOTE: For model-driven app, sitemap, and appmodulecomponent create/update, use manage_app. Do not use raw Web API for those writes.

WHEN TO USE:
- Endpoints not covered by specialized tools (e.g. WhoAmI, $metadata, custom actions)
- Inspect raw JSON responses + headers
- Always check whether a specialized tool exists first (see Blocked list)

Parameters

Name Type Required Default Description
method string Yes - GET, POST, PUT, PATCH, DELETE.
url string Yes - Relative path, e.g. 'accounts', 'contacts(guid)', '$metadata'.
body string No "" JSON body for POST/PUT/PATCH.
headers string No "" Extra headers as JSON.
include_headers boolean No false Include response headers.
max_response_lines integer No 200 Truncate response. Use 50 for large outputs ($metadata).

Input Schema

{
  "type": "object",
  "properties": {
    "method": {
      "type": "string",
      "description": "GET, POST, PUT, PATCH, DELETE."
    },
    "url": {
      "type": "string",
      "description": "Relative path, e.g. 'accounts', 'contacts(guid)', '$metadata'."
    },
    "body": {
      "type": "string",
      "description": "JSON body for POST/PUT/PATCH.",
      "default": ""
    },
    "headers": {
      "type": "string",
      "description": "Extra headers as JSON.",
      "default": ""
    },
    "include_headers": {
      "type": "boolean",
      "description": "Include response headers.",
      "default": false
    },
    "max_response_lines": {
      "type": "integer",
      "description": "Truncate response. Use 50 for large outputs ($metadata).",
      "default": 200
    }
  },
  "required": [
    "method",
    "url"
  ]
}

Related MCP Resources

This tool does not require any MCP resources.

When To Use

  • Endpoints not covered by specialized tools (e.g. WhoAmI, $metadata, custom actions)
  • Inspect raw JSON responses + headers
  • Always check whether a specialized tool exists first (see Blocked list)

Notes

  • Use the exact MCP description and parameter schema above as the authoritative contract.

Example

{
  "method": "string",
  "url": "string"
}

Output

Returns CallToolResult from the MCP server. The response content and structured fields follow the tool implementation and model returned by ExecuteWebApiTool.execute_webapi.

Clone this wiki locally