Multi-Agent Planning with MCP Tools for Web Form Generation

  • Matheus G. S. Dalmolin UFRN
  • Giovanna A. P. Soares UFRN
  • Lays D. C. da Silva UFRN
  • Karolayne S. de Azevedo UFRN
  • Marcelo A. C. Fernandes UFRN

Resumo


Modelos de linguagem conseguem gerar formulários web a partir de linguagem natural, mas a geração direta de código tende a ser pouco auditável, pouco reprodutível e difícil de reparar. Apresentamos uma abordagem que transforma solicitações do usuário em um plano editável de chamadas tipadas a ferramentas Model Context Protocol (MCP), executadas por componentes especializados em HTML, CSS e JavaScript após aprovação humana. Uma resposta com esquema JSON obriga o planejador HTML a enumerar os identificadores de campo esperados antes de emitir as chamadas, um nó crítico no estilo LLM-as-a-Judge audita a cobertura do plano e um normalizador determinístico alinha os identificadores ao esquema. Em três prompts replicados em N = 10 repetições independentes por condição, a abordagem atinge pontuação agregada de 99,1±2,2 contra 82,1±16,0 da geração direta e cobertura perfeita dos comportamentos solicitados (1,00±0,00 contra 0,55±0,15), a cerca de 4,8× a latência. Uma ablação de execução determinística do plano atinge 100,0± 0,0, limite superior empírico do catálogo atual.

Referências

Anthropic (2024). Model context protocol. [link]. Accessed: 2026-05-25.

Beason, J., Cheng, R., Schoop, E., and Nichols, J. (2025). Athena: Intermediate representations for iterative scaffolded app generation with an LLM. arXiv preprint arXiv:2508.20263.

Brown, T. B., Mann, B., Ryder, N., et al. (2020). Language models are few-shot learners. Advances in Neural Information Processing Systems, 33:1877–1901.

Chen, M., Tworek, J., Jun, H., et al. (2021). Evaluating large language models trained on code. arXiv preprint arXiv:2107.03374.

Chen, X., Lin, M., Schärli, N., and Zhou, D. (2023). Teaching large language models to self-debug. arXiv preprint arXiv:2304.05128.

Ecma International (2025). ECMAScript language specification. [link].

FastAPI (2026). Fastapi documentation. [link]. Accessed: 2026-05-25.

Geng, S., Cooper, H., Moskal, M., Jenkins, S., Berman, J., Ranchin, N., West, R., Horvitz, E., and Nori, H. (2025). JSONSchemaBench: A rigorous benchmark of structured outputs for language models. arXiv preprint arXiv:2501.10868.

Hong, S., Zhuge, M., Chen, J., et al. (2024). MetaGPT: Meta programming for a multi-agent collaborative framework. In Proceedings of the International Conference on Learning Representations.

Hou, X., Zhao, Y., Wang, S., and Wang, H. (2025). Model context protocol (MCP): Landscape, security threats, and future research directions. arXiv preprint arXiv:2503.23278.

Kim, H., Mitra, K., Shen, C., Zhang, D., and Hruschka, E. (2025). AIPOM: Agent-aware interactive planning for multi-agent systems. In Proceedings of the 2025 Conference on Empirical Methods in Natural Language Processing: System Demonstrations.

LangChain (2026). Langgraph documentation. [link]. Accessed: 2026-05-25.

Madaan, A., Tandon, N., Gupta, P., Hallinan, S., Gao, L., Wiegreffe, S., Alon, U., Dziri, N., Prabhumoye, S., Yang, Y., Welleck, S., Majumder, B. P., Gupta, S., Yazdanbakhsh, A., and Clark, P. (2023). Self-refine: Iterative refinement with self-feedback. arXiv preprint arXiv:2303.17651.

Mialon, G., Dessì, R., Lomeli, M., Nalmpantis, C., Pasunuru, R., Raileanu, R., Rozière, B., Schick, T., Dwivedi-Yu, J., Celikyilmaz, A., Grave, E., LeCun, Y., and Scialom, T. (2023). Augmented language models: a survey. Transactions on Machine Learning Research.

OpenRouter (2026). Openrouter api reference. [link]. Accessed: 2026-05-25.

Panickssery, A., Bowman, S. R., and Feng, S. (2024). LLM evaluators recognize and favor their own generations. In Advances in Neural Information Processing Systems.

Patil, S. G., Zhang, T., Wang, X., and Gonzalez, J. E. (2024). Gorilla: Large language model connected with massive APIs. In Advances in Neural Information Processing Systems.

Qin, Y., Liang, S., Ye, Y., et al. (2024). ToolLLM: Facilitating large language models to master 16000+ real-world APIs. In Proceedings of the International Conference on Learning Representations.

Schick, T., Dwivedi-Yu, J., Dessì, R., Raileanu, R., Lomeli, M., Zettlemoyer, L., Cancedda, N., and Scialom, T. (2023). Toolformer: Language models can teach themselves to use tools. In Advances in Neural Information Processing Systems.

Shinn, N., Cassano, F., Berman, E., Gopinath, A., Narasimhan, K., and Yao, S. (2023). Reflexion: Language agents with verbal reinforcement learning. arXiv preprint arXiv:2303.11366.

Si, C., Zhang, Y., Li, R., Yang, Z., Liu, R., and Yang, D. (2024). Design2Code: Benchmarking multimodal code generation for automated front-end engineering. arXiv preprint arXiv:2403.03163.

Tekinerdogan, B. and Aktekin, N. (2020). Model-based user interface design for generating e-forms in the context of an e-government project. arXiv preprint arXiv:2003.08172.

Wang, L., Xu, W., Lan, Y., et al. (2023). Plan-and-solve prompting: Improving zero-shot chain-of-thought reasoning by large language models. In Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 2609–2634.

World Wide Web Consortium (2017). HTML 5.2. [link].

Wu, Q., Bansal, G., Zhang, J., et al. (2023). AutoGen: Enabling next-gen LLM applications via multi-agent conversation. arXiv preprint arXiv:2308.08155.

Xiao, J., Wang, M., Lam, M. H., Wan, Y., Liu, J., Huo, Y., and Lyu, M. R. (2025). DesignBench: A comprehensive benchmark for MLLM-based front-end code generation. arXiv preprint arXiv:2506.06251.

Xu, B., Peng, Z., Lei, B., Mukherjee, S., Liu, Y., and Xu, D. (2023). ReWOO: Decoupling reasoning from observations for efficient augmented language models. arXiv preprint arXiv:2305.18323.

Yao, S., Zhao, J., Yu, D., Du, N., Shafran, I., Narasimhan, K., and Cao, Y. (2023). ReAct: Synergizing reasoning and acting in language models. In Proceedings of the International Conference on Learning Representations.

Zan, D., Chen, B., Zhang, F., Lu, D., Wu, B., Guan, B., Yongji, W., and Lou, J.-G. (2023). Large language models meet NL2Code: A survey. In Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 7443–7464.

Zheng, L., Chiang, W.-L., Sheng, Y., Zhuang, S., Wu, Z., Zhuang, Y., Lin, Z., Li, Z., Li, D., Xing, E. P., Zhang, H., Gonzalez, J. E., and Stoica, I. (2023). Judging LLM-as-a-judge with MT-Bench and chatbot arena. In Advances in Neural Information Processing Systems.
Publicado
19/10/2026
DALMOLIN, Matheus G. S.; SOARES, Giovanna A. P.; SILVA, Lays D. C. da; AZEVEDO, Karolayne S. de; FERNANDES, Marcelo A. C.. Multi-Agent Planning with MCP Tools for Web Form Generation. In: ENCONTRO NACIONAL DE INTELIGÊNCIA ARTIFICIAL E COMPUTACIONAL (ENIAC), 23. , 2026, Cuiabá/MT. Anais [...]. Porto Alegre: Sociedade Brasileira de Computação, 2026 . p. 551-562. ISSN 2763-9061. DOI: https://doi.org/10.5753/eniac.2026.30055.

Artigos mais lidos do(s) mesmo(s) autor(es)