diff --git a/modules/ROOT/nav.adoc b/modules/ROOT/nav.adoc index 96f9abae..3b2963d7 100644 --- a/modules/ROOT/nav.adoc +++ b/modules/ROOT/nav.adoc @@ -15,6 +15,9 @@ *** xref:exp-services-create-mcp-server.adoc[] *** xref:exp-services-add-semantic.adoc[] *** xref:exp-services-view-details.adoc[] + ** xref:exp-playground-overview.adoc[] + *** xref:exp-playground-api.adoc[] + *** xref:exp-playground-mcp.adoc[] ** xref:exp-scanners-add-from-providers.adoc[] *** xref:exp-scanners-manage.adoc[] ** xref:exp-providers-manage.adoc[] diff --git a/modules/ROOT/pages/exp-playground-api.adoc b/modules/ROOT/pages/exp-playground-api.adoc new file mode 100644 index 00000000..77affbd6 --- /dev/null +++ b/modules/ROOT/pages/exp-playground-api.adoc @@ -0,0 +1,85 @@ += Use the API Playground +:keywords: api playground, test api, api endpoints, api authentication, request snippet, api response, anypoint platform, enhanced experience + +The API playground lets you explore an API's endpoints, configure and send requests, and inspect responses from the service detail page. Instead of copying paths into an external tool such as Postman, you exercise the API in the enhanced experience and see the results next to its documentation. + +//placeholder for image of API playground + +== Before You Begin + +Before getting started, make sure you have: + +* An Anypoint Platform account. +* One of these permissions: ++ +-- +** Exchange: Exchange Viewer +** Exchange: Exchange Contributor +** Exchange: Exchange Administrator +-- ++ +For more information, see xref:exp-home-start.adoc#permissions[Enhanced Experience Permissions]. + +== Open the API Playground + +. In *Portfolio*, open the *APIs* catalog and select the API you want to test. +. On the service detail page, select the *Playground* tab. + +The playground shows the endpoint list on the left. Each endpoint has its own required parameters and configuration. + +== Select an Endpoint and Environment + +. In the endpoint list, select the endpoint you want to test (for example, a *POST* endpoint that creates a new record). +. Select the version and instance to choose the environment you want to test against. + +== Configure Authentication + +Before sending a request, authenticate to the API. The available methods depend on what the API owner enabled. + +. In the authentication section, select an authentication method. If the API owner enabled only one method (for example, API key), use that method. +. Enter the required values, such as the API key. + +== Configure the Request + +After authenticating, configure the details of the request: + +Body:: ++ +Configure the request body in the format the endpoint expects, such as JSON, XML, form, or multipart. Multipart supports file upload. + +Parameters:: ++ +Add and configure request parameters. + +Headers:: ++ +Add and configure request headers. + +=== Copy the Request Snippet + +The playground generates a request snippet that reflects your current configuration. As you change the authentication, body, parameters, or headers, the snippet updates to match. + +. Select the format you want for the snippet. +. Copy the snippet to use it outside the playground. + +== Send the Request and Review the Response + +. After configuring the request, select *Send*. +. Review the response: ++ +-- +* *Status code*, along with the response size and speed. +* *Response body*. +* *Response headers*, which you can copy. +-- + +== Review Request History + +After you test several requests or endpoints within an API, the playground keeps a history of your configurations. Open the history to review a previous request or return to an earlier configuration. + +== See Also + +* xref:exp-playground-overview.adoc[] +* xref:exp-playground-mcp.adoc[] +* xref:exp-services-view-details.adoc[] +* xref:exp-instances-add.adoc[] diff --git a/modules/ROOT/pages/exp-playground-mcp.adoc b/modules/ROOT/pages/exp-playground-mcp.adoc new file mode 100644 index 00000000..47881e3f --- /dev/null +++ b/modules/ROOT/pages/exp-playground-mcp.adoc @@ -0,0 +1,70 @@ += Use the MCP Server Playground +:keywords: mcp server playground, test mcp server, mcp inspector, llm integration, mcp tools, tool invocation, anypoint platform, enhanced experience + +The MCP server playground lets you understand what an MCP server does and how it behaves without connecting it to an external tool such as Postman, the MCP Inspector, or Claude Desktop. Instead of reading only the overview and documentation, you explore the server's tools and see what they return, directly on the service detail page. + +The playground offers two modes: + +Inspector mode:: ++ +Explore individual tools, configure and invoke them, and inspect what each one returns. Use this mode to understand each tool's function and response on its own. + +LLM Integration mode:: ++ +Connect a large language model and chat with it. The model calls the MCP server's tools as needed to answer your prompts, so you can see how an LLM works with the server. + +//placeholder for image of MCP server playground + +== Before You Begin + +Before getting started, make sure you have: + +* An Anypoint Platform account. +* One of these permissions: ++ +-- +** Exchange: Exchange Viewer +** Exchange: Exchange Contributor +** Exchange: Exchange Administrator +-- ++ +For more information, see xref:exp-home-start.adoc#permissions[Enhanced Experience Permissions]. + +== Open the MCP Server Playground + +. In *Portfolio*, open the *MCP Servers* catalog and select the MCP server you want to test. +. On the service detail page, select the *Playground* tab. + +== Use Inspector Mode + +Inspector mode lists the tools inside the MCP server so you can explore each tool's functionality and description. + +. In the tool list, select the tool you want to test. +. If you aren't already authenticated to the MCP server, configure authentication. If you're already authenticated, you don't need to authenticate again. +. Configure the tool's parameters in form or JSON format. +. (Optional) Copy the request snippet, which reflects your configuration. +. Select *Execute* to invoke the tool. +. Review the response, including the status code and the full JSON response body. + +If required parameters are missing or validation fails, the playground shows an error or an explanation of the failure. + +== Use LLM Integration Mode + +LLM Integration mode lets you see how a large language model calls the MCP server's tools in response to prompts. + +. Switch to *LLM Integration* mode. +. Connect to an LLM proxy from your catalog. +. Enter a prompt, or select a suggested prompt (for example, a prompt that queries a Salesforce object). +. Send the request. + +The assistant shows which tool the prompt invokes and returns a response that integrates the result of the tool call. Continue the conversation to see how different prompts invoke different tools. + +Use this mode to understand how an LLM communicates with the MCP server and which tools different prompts invoke. + +== See Also + +* xref:exp-playground-overview.adoc[] +* xref:exp-playground-api.adoc[] +* xref:exp-services-create-mcp-server.adoc[] +* xref:exp-services-view-details.adoc[] +* xref:exp-claude-desktop-connect.adoc[] diff --git a/modules/ROOT/pages/exp-playground-overview.adoc b/modules/ROOT/pages/exp-playground-overview.adoc new file mode 100644 index 00000000..938533f4 --- /dev/null +++ b/modules/ROOT/pages/exp-playground-overview.adoc @@ -0,0 +1,52 @@ += Playground Overview +:keywords: playground, api playground, mcp server playground, test api, test mcp server, anypoint platform, enhanced experience + +The playground lets you try services in your portfolio directly in the enhanced experience—no external tools required. Explore endpoints and tools, configure and send requests, and inspect responses without leaving the service detail page. + +Before the playground, understanding a service meant reading its overview and documentation, then copying paths into an external tool such as Postman or the MCP Inspector to see how it behaved. The playground brings that testing loop into the enhanced experience so you can go from reading about a service to exercising it in the same view. + +//placeholder for image of playground tab on a service detail page + +== Playground Types + +The playground adapts to the type of service you open: + +API playground:: ++ +Test an API by exploring its endpoints, configuring authentication and requests, sending calls, and inspecting responses. Serves a similar purpose to the API Console in Anypoint Platform, embedded in the enhanced experience UI. See xref:exp-playground-api.adoc[]. + +MCP server playground:: ++ +Test an MCP server in two modes: an *Inspector* mode to explore and invoke individual tools, and an *LLM Integration* mode to see how a large language model calls the server's tools in response to prompts. See xref:exp-playground-mcp.adoc[]. + +== Before You Begin + +Before getting started, make sure you have: + +* An Anypoint Platform account. +* One of these permissions: ++ +-- +** Exchange: Exchange Viewer +** Exchange: Exchange Contributor +** Exchange: Exchange Administrator +-- ++ +For more information, see xref:exp-home-start.adoc#permissions[Enhanced Experience Permissions]. + +== Open the Playground + +. In *Portfolio*, open the catalog for the service type (for example *APIs* or *MCP Servers*). +. Use the search box to find the service by name or description, or scan the list or grid. +. Select the service to open its detail page. +. Select the *Playground* tab. + +The playground opens with the endpoints or tools available for the service you're viewing. + +== See Also + +* xref:exp-playground-api.adoc[] +* xref:exp-playground-mcp.adoc[] +* xref:exp-services-view-details.adoc[] +* xref:exp-services-add-to-portfolio.adoc[] +* xref:exp-instances-add.adoc[]