Estruturar mensagens e preferências
Defina o texto do sistema e as dicas do modelo para a chamada.
Estruturar mensagens e preferências é uma aula grátis de MCP Academy no CoddyKit. Esta é a aula 3 de 4. Você pode ler a aula completa abaixo gratuitamente — depois pratica ao vivo no navegador com um editor de código integrado e um tutor de IA 24/7. Faz parte do caminho de aprendizado de MCP Academy, e seu progresso é sincronizado entre a web e o app CoddyKit. O curso de MCP Academy inclui 4 aulas no total.
Partes desta aula ainda não foram traduzidas e aparecem em inglês.
You Steer the Generation
Beyond the prompt, you can shape the call: a system prompt, model hints, length, and how much past context to include.
Set the System Prompt
Use systemPrompt to set the model’s role or tone for this one call, like telling it to be a terse code reviewer.
"systemPrompt": "You are a concise code reviewer."Stack Multiple Messages
The messages array can hold several turns, letting you give the model a short back-and-forth as context, not just one line.
Suggest a Model with Hints
modelPreferences takes hints — substrings like claude-3-sonnet — that the client may match to an available model.
"hints": [{ "name": "claude-3-sonnet" }]Hints Are Only Advisory
The client makes the final pick. A hint is a suggestion; the host may map it to an equivalent model from another provider.
Fall Back Gracefully
List hints in order of preference. A broad fallback like a bare claude hint catches any Claude model if your first pick is missing.
"hints": [{ "name": "claude-3-sonnet" },
{ "name": "claude" }]Prioritize Intelligence
Set intelligencePriority from 0 to 1. Higher values nudge the client toward more capable, smarter models for hard work.
"intelligencePriority": 0.8Prioritize Speed
Need low latency? Raise speedPriority toward 1 and the client leans on faster models, trading some depth for quickness.
"speedPriority": 0.8Prioritize Cost
Raise costPriority to prefer cheaper models. These three priorities are normalized hints, not hard rules.
"costPriority": 0.3Include Surrounding Context
An includeContext setting lets the request pull in context from MCP servers, so the model sees more than just your text.
Tune Temperature
Where supported, a temperature value shifts replies from focused and deterministic to more varied and creative.
Quick Check
One question on guiding model choice.
Recap
Shape calls with a systemPrompt, layered messages, and modelPreferences — hints plus cost, speed, and intelligence priorities. 🎛️
Perguntas Frequentes
A aula “Estruturar mensagens e preferências” é grátis?
Sim — o texto completo de “Estruturar mensagens e preferências” é grátis para ler aqui na web. Para praticá-la interativamente (um editor de código integrado e um tutor de IA 24/7) e desbloquear o restante do curso de MCP Academy, atualize para CoddyKit PRO. O curso de MCP Academy inclui 4 aulas no total.
O que vou aprender em “Estruturar mensagens e preferências”?
Defina o texto do sistema e as dicas do modelo para a chamada. Você pratica MCP Academy com código prático que executa diretamente no navegador, e um tutor de IA 24/7 responde suas dúvidas enquanto trabalha na aula.
Preciso ter experiência prévia para começar MCP Academy?
Nenhuma experiência prévia é necessária. MCP Academy no CoddyKit é estruturado para alunos iniciantes até avançados, então você pode começar aqui ou desde o início e aprender no seu ritmo. Esta é a aula 3 de 4.
Quanto tempo leva a aula “Estruturar mensagens e preferências”?
A maioria das aulas CoddyKit leva cerca de 5–10 minutos. Cada uma é compacta e interativa, então você faz progresso constante e retoma exatamente de onde parou entre web e app.
Posso escrever e executar código nesta aula de MCP Academy?
Sim. Cada aula de MCP Academy inclui um editor de código integrado, então você escreve e executa código real direto no navegador e recebe feedback de IA instantaneamente — nenhuma configuração local necessária.
Todas as aulas deste curso
- O que a amostragem possibilita
- Solicitar uma conclusão ao host
- Estruturar mensagens e preferências
- Aprovação com participação humana