Skip to main content
Prompts are managed assets in MCP Foundry, not scattered text embedded in chats or application code. A reusable prompt template captures the role, context, rules, tool guidance, and response format needed for reliable agent behavior. Once published through a virtual server, an MCP client can discover and invoke it as a named command.

Create a reusable prompt

  1. Open Prompts in the MCP Foundry dashboard.
  2. Select Add Prompt.
  3. Enter a clear name and a short description explaining what the prompt does.
  4. Add tags to make the prompt easier to find and manage.
  5. Write the template using Jinja 2 syntax.
  6. Define the arguments the prompt expects.
  7. Set visibility and assign the prompt to its owning team.
  8. Save the prompt.
Choose names that describe the outcome, such as draft-compliant-customer-response, rather than the team or model that first created the prompt.

Design parameterized templates

Jinja 2 templating lets one prompt adapt to many requests. Use declared arguments for the values that vary between invocations, such as a request summary, audience, policy reference, or desired output format. Keep templates clear about:
  • The role and task the agent should perform.
  • The context it must consider and the arguments that supply that context.
  • Which tools to use, and when not to use them.
  • Constraints, refusal conditions, and human-escalation requirements.
  • The exact response structure, fields, and tone expected by downstream users or systems.
Declare every required argument rather than relying on hidden client-side context. Test representative values, including missing, empty, and unexpected inputs, before publication.

Set ownership and visibility

Assign a team when the prompt is shared work so that changes, reviews, and operational ownership do not depend on one person. Select a visibility level that matches the audience and the sensitivity of the instructions and embedded examples.
Security note: Keep secrets, credentials, and sensitive customer data out of prompt templates. Visibility controls help govern discovery, but they do not replace safe handling of data supplied through prompt arguments.

Publish through a virtual server

A saved prompt becomes usable by connected agents only after it is attached to a virtual server.
  1. Open Virtual Servers and select the target server.
  2. Attach the approved prompt to the server’s capability catalog.
  3. Save or publish the virtual server.
  4. Connect an authorized MCP client and verify that the prompt appears under its expected name.
  5. Invoke the prompt with representative arguments and check the rendered instructions and output behavior.

Govern the prompt lifecycle

Review and improve prompts centrally as models, policies, tools, and business requirements change. Use the prompt history to understand changes, compare versions before release, and roll back quickly if a revision causes an issue. Because the prompt remains separate from application code, you can improve its behavior without changing every calling application. Use a review process proportionate to the prompt’s impact. Prompts that direct external communication, regulated decisions, or write-capable tools should receive stricter testing and approval than low-risk formatting prompts. For additional capability guidance, see Manage MCP capabilities and MCP Foundry concepts.