create_web_resource_and_publish
Create a Dynamics 365 web resource without overwriting saved names; preview changes with dry run, save without publishing, or publish with scoped PublishXml.
Instructions
Create a Web Resource without overwriting an existing saved name. Defaults to scoped PublishXml after saving. publish=false saves only; dry_run=true previews without writing. A publication error preserves saved=true and the created ID; recover with publish_web_resource.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| dryRun | No | Compatibility alias for dry_run; conflicting aliases are rejected. | |
| content | No | Inline content, UTF-8 by default. Supply exactly one of content or file_path; empty content is allowed. | |
| dry_run | No | Read-only preview showing the environment, target, metadata changes and content hashes. Does not save or publish. | |
| publish | No | Default true preserves the old save-and-publish behavior. Set false to save without publishing. | |
| filePath | No | Compatibility alias for file_path; conflicting aliases are rejected. | |
| file_path | No | Absolute source-file path on the MCP server machine; read as bytes and Base64 encoded. Supply exactly one of file_path or content. Maximum 10 MiB. | |
| description | No | Optional description; an empty string clears it. | |
| displayName | No | Compatibility alias for display_name; conflicting aliases are rejected. | |
| display_name | No | ||
| contentEncoding | No | Compatibility alias for content_encoding; conflicting aliases are rejected. | |
| webResourceType | No | Compatibility alias for web_resource_type; conflicting aliases are rejected. | |
| content_encoding | No | Inline content encoding, default utf8. Base64 must be canonical. Not used with file_path. | |
| web_resource_type | No | 1 HTML, 2 CSS, 3 JS, 4 XML, 5 PNG, 6 JPG, 7 GIF, 8 XAP, 9 XSL, 10 ICO, 11 SVG, 12 RESX; platform/version support is validated on save. | |
| solutionUniqueName | No | Compatibility alias for solution_unique_name; conflicting aliases are rejected. | |
| solution_unique_name | No | Optional unmanaged solution unique name, sent in MSCRM.SolutionUniqueName when creating. |