Skip to main content
Glama
sassoftware

SAS MCP Server

Official
by sassoftware

apply_report_operations

Destructive

Batch-apply report changes atomically: add pages, add objects, set parameters, or swap data sources in SAS Visual Analytics reports.

Instructions

Apply an ordered batch of operations to a report — the authoring workhorse.

This is how you add pages, add objects (any of the ~60 VA visual, control, and content types), set parameters, and swap data sources. operations is the native SAS Visual Analytics operations array; the whole batch is applied atomically (all succeed or nothing changes).

Operation keys (one per array element): addData, addPage, addObject, updateObject, setParameterValue, updateData, changeData, applyDataView. Call describe_report_objects for each operation's shape (operation="addData" covers formats, aggregations, and geography via dataItems) and each object's data roles, and get_castable_columns to map columns onto those roles.

Layout & titles (see describe_report_objectsplacement / layout_recipes for details):

  • Page title — give addPage a title (e.g. {"addPage": {"pageName": "Overview", "title": "Sales Overview"}}); it becomes a text band at the top of that page's body. Page/report headers accept ONLY control objects — never text or visuals.

  • Chart titles — pass {"options": {"object": {"title": "..."}}} inside the object spec at add time (all types except standardContainer, which takes no options at add time).

  • One-batch multi-page — create pages inline with placement {"report": {"context": "new_page", "pageName": "Trends", "pagePosition": 1}} (numeric position) and target that pageName from later operations in the same batch.

  • Grids/columns — relativeToObject with left/right/top/bottom (geometric) or before/after (flow order) against an EXISTING object's name; same-batch forward references fail, so chain across calls using the names each result returns. Objects are auto-named and auto-sized; placement and dataRoles are write-once (updateObject changes options only).

  • Read structure back anytime with get_report_outline; verify visually with export_report page-by-page (see verify_hint in the result).

The tool validates every operation against the object catalog before any HTTP call (unknown/typo'd object type, non-addable object, bad data-role names or arity, disallowed object/placement keys) and reports ALL invalid operations at once. It also handles the ETag optimistic-concurrency handshake for you, retrying once transparently on a concurrent edit.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dry_runNoValidate and return the normalized payload (plus any soft warnings about missing common roles) without writing anything.
report_idYesTarget report id (from ``create_report`` or ``list_reports``).
operationsYesOrdered native operations array. Example element: ``{"addObject": {"object": {"barChart": {"dataSource": "CARS", "dataRoles": {"category": "Origin", "measures": ["MSRP"]}, "options": {"object": {"title": "MSRP by Origin"}}}}, "placement": {"page": {"target": "Overview"}}}}``.
result_folderNoSave-as target folder URI; omit for My Folder.
response_formatNo``concise`` (default) returns the created page/object/ data-source names+labels; ``detailed`` also echoes the full VA response.concise
result_report_nameNoSave-as — apply the operations to a NEW report with this name, leaving the source report untouched (atomic template instantiation; pairs with ``changeData``).
result_name_conflictNoSave-as name-conflict policy — ``rename`` (default), ``abort``, or ``replace``.rename

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Addedv1.7.0

TDQS

A5/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description discloses behavior beyond the annotations (destructiveHint=true) by detailing atomic application, validation before HTTP calls, ETag optimistic-concurrency with retry, write-once placement/dataRoles, auto-naming and auto-sizing, and the save-as behavior to avoid destructive edits. It also explicitly states 'the whole batch is applied atomically (all succeed or nothing changes).' This is far more than annotations provide and is transparent about mutations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Despite its length, the description is well-structured with clear sections: an opening shorthand of usage, operation keys, layout & titles specifics, validation and concurrency behavior. Every sentence carries purpose—no fluff. It is front-loaded with the core verb and resource, and the technical details are organized logically for an agent to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of this tool (multiple operation types, layout rules, validation logic), the description is exceptionally complete. It covers operational invocation, validation guarantees, concurrency handling, and the output options (dry_run, result_report_name for save-as, response_format). It also references output verification via export_report and provides a comprehensive example. The presence of the output schema further reduces the need for result-format discussion, but the description still addresses all needed context.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema description coverage is 100% and the schema is rich, but the description adds even more semantic depth: it explains the operations array structure with an example, clarifies layout and placement options with concrete JSON snippets, and describes constraints like 'relativeToObject' against existing objects and the write-once rule. This exceeds the schema's role descriptions and gives crucial contextual meaning.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb+resource (apply operations to a report) and accurately characterizes the tool as the 'authoring workhorse' for adding pages, objects, parameters, and swapping data sources. It distinguishes itself from sibling tools like create_report, describe_report_objects, and get_report_outline by clearly scoping its role in the batch modification workflow.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly says 'This is how you add pages, add objects... set parameters, and swap data sources,' and gives detailed operational patterns. It provides when-to-use and when-not-to-use (e.g., page/report headers accept ONLY control objects, same-batch forward references fail). It names complementary tools (describe_report_objects, get_castable_columns, get_report_outline, export_report) and explains their roles for contextual layering.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/sassoftware/sas-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server