added prototype flag to agents query. Added tot material inventory mass query