Prompts
As explained in Why reShapr?, reShapr can create secure MCP servers in seconds without coding, just by importing your API’s existing artifacts - like OpenAPI 3.x specs, GraphQL schemas and gRPC/Protobuf definitions. These artifacts are directly used to produce MCP Tools that are at the core of the Model Context Protocol. Another interesting aspect of MCP is that it may be composed of MCP Resources and MCP Prompts. While MCP Tools are often enough for practical use of MCP, all these capabilities are likely to be part of a complete and production-ready MCP Server.
Contrary to tools, prompts can’t - and shouldn’t - be directly inferred from an API contract. They should be designed to provide users with accelerators on how to interact with the model, offer additional instructions and guardrails on how to use tools for a specific use case, or provide additional details on how to orchestrate tool calls.
See Prompts attached to a controlled GitHub GraphQL service and Prompts used with an MCP App. This page remains the canonical specification reference.
reShapr provides an easy way to design and specify your Prompts using a simple YAML description, called the Prompts specification. To provide these Prompts to a reShapr-powered MCP endpoint, write this file and attach it to an existing Service. Here is a minimal example:
apiVersion: reshapr.io/v1alpha1
kind: Prompts
service:
name: Petstore
version: 1.0.0
prompts:
list_pets:
title: List the pets
description: Browse the catalog to get all the pets
result: Get all the pets from the catalog
get_pet:
title: Get details of a pet with its name
description: Get details for a specific pet from the catalog
arguments:
- name: name
description: The name of the pet to retrieve
required: true
result: |-
Get the detailed information on the pet named '${name}'.
The MCP tool to call is 'get_pet_by_name', using '${name}' as the tool argument called 'name'.
A Prompts artifact follows some simple rules:
- It always contains an identification section made of
apiVersionandkindproperties that must have thereshapr.io/v1alpha1andPromptsvalues respectively, - It must be bound to a specific reShapr Service using the
service.nameandservice.versionproperties, whose values must match an already discovered Service, - The
promptssection then defines the prompts:- We have 2 prompts here:
list_petsandget_pet - A prompt must always have a
resultwhich will be returned to the model when called, - A prompt may provide optional
titleanddescriptionto provide more context to the user when choosing an appropriate prompt, - A prompt may also provide
argumentsthat allow the production of a customized result prompt message, where the user provides their contextual values for each argument.
- We have 2 prompts here:
In the case of a prompt using arguments, the result value can be expressed using ${} expressions that will be replaced by user-provided values. Typically in our example, if the user is looking for a pet named Rusty, the prompt will be generated with Rusty in the place of the ${name} placeholder.
When the Artifact is attached, reShapr records each prompts key as a derived capability. A Configuration Plan exposes the Prompt only when its includedArtifacts selection includes that Artifact, or when the selection is absent or empty. See Attach and Select reShapr Artifacts for an executable example and its validated Prompt Artifact.