Instructions
/instructions are reusable prompts that help teams standardise how they interact with connected tools and apply consistent guidelines. They can be simple static prompts, dynamic prompts that accept user input, or prompts that reference @knowledge.
Common uses for /instructions include:
Code generation
- Generate API endpoints, components, or routes using
@knowledgeschemas and$argumentsfor customisation
Code review and refactoring
- Review code against style guides, refactor using
@knowledgestandards, or validate against domain rules
Documentation and explanation
- Explain API behaviour or clarify system architecture using
@knowledgereferences
Specification and planning
- Create feature specifications, plan implementations, or define requirements using team standards and
@knowledgeworkflows
How /instructions help in context engineering
Section titled “How /instructions help in context engineering”Selecting a published /instruction applies your team’s guidelines, workflows, and best practices automatically. No more typing the same prompts over and over.
- Consistency - Uniform output quality across the team
- Efficiency - No need to remember or retype complex prompts
- Maintainability - Update once in Sokket, changes propagate to all connected tools
- Discoverability - Browse available
/instructionsin your tools
Using arguments in /instructions
Section titled “Using arguments in /instructions”Arguments make /instructions dynamic by accepting user input. Type $variableName in your /instruction content to create arguments. The Properties panel updates automatically. You can’t manually create arguments from the panel.
e.g.
Generate a component called $componentNameReview this code: $codeSnippetCreate an API endpoint for $resourceType
Users are prompted for argument values before the /instruction runs, making prompts reusable across different scenarios.
Using references to @knowledge files
Section titled “Using references to @knowledge files”References pull @knowledge files into your /instructions, giving the AI access to static reference material like API schemas, style guides, or documentation.
Type @knowledgeFileName in your /instruction content to reference @knowledge files.
e.g.
Refactor this code using @frontend-style-guideGenerate a new API route based on @api-schemaDraft an error message for $errorCode using @standard-api-error-codes
Reference names must match the @knowledge file name exactly, including spelling and casing.
References are optional. /instructions can work as standalone prompts, use only arguments, use only references, or combine both. Referenced @knowledge files must be published.
How to build /instructions
Section titled “How to build /instructions”/instructions must provide metadata to the tool, as defined by the Model Context Protocol (MCP) standard. This metadata is managed in the Properties panel of the /instruction editor.
- From a library, add
+ Instruction - Give it a file name (e.g.,
build-route.md) - In the editor, write your prompt
- Type
$variableNameto create arguments (optional) - Type
@knowledgeFileto reference@knowledgefiles (optional)
- Type
- Fill out the Properties panel: Description is required. If you use arguments, each argument’s Description and Required? toggle are required
- Select
Publishto make it available in connected tools
Properties
Section titled “Properties”As you type in the editor, this panel updates automatically. Published /instructions are sent to the MCP endpoint and visible in connected tools. Drafts are visible only in the Sokket web app.
Details
Name: The Instruction nameDescription: (MCP Requirement) Required. The human-readable description your team will see in their tool. The/instructioncannot be published without it.
Arguments (only appears if you type $variableName in your content)
- Typing
$variableNamein the editor automatically adds an entry in the Properties panel. Description: (MCP Requirement) Required for each argument before publishing. Tells the user what to type (e.g., “The name of the component to create”). Without this, you cannot publish the/instructionand users will see a blank prompt.Required?(toggle): (MCP Requirement) Must be set for each argument. ChooseRequiredto force the tool to prompt the user for this value, orOptionalto make it optional. The/instructioncannot be published until this toggle is set for all arguments.
References (only appears if you type @knowledgeFile in your content)
- Typing
@knowledgeFilein the editor creates a reference (e.g.,@frontend-style-guide). - All
@referencesmust resolve to existing, published@knowledgefiles. The/instructioncannot be published with broken references. Description: (Optional) Explain why this@knowledgefile is being referenced.
Troubleshooting
Section titled “Troubleshooting”The Publish button is disabled when mandatory fields are missing. Check the Properties panel: all /instructions must have a Description, all Arguments must have their own Description and Required? toggle set, and all @references must resolve to existing, published @knowledge files.
A new /instruction is not appearing in a connected tool. The /instruction is likely still a Draft. Only Published items are sent to the MCP endpoint.
A /instruction runs, but the tool doesn’t ask for an argument. The Required? toggle for that argument is likely set to Optional. Set it to Required to mark it as mandatory.
An @knowledge file reference fails. The referenced @knowledge file is not published, or the reference name doesn’t match the filename exactly (check spelling and casing). Publish the @knowledge file or fix the reference name, then republish the /instruction.
Next Steps
Section titled “Next Steps”Learn more about @knowledge, context engineering, or connect tools.